Skip to content

Commit

Permalink
[fix](shell) clean ShellCheck (#45608)
Browse files Browse the repository at this point in the history
### What problem does this PR solve?
Related PR: #45490 

Problem Summary:
```shell
In gensrc/script/gen_build_version.sh line 38:
if [[ ${build_version_hotfix} > 0 ]]; then
                              ^-- SC2071 (error): > is for string comparisons. Use -gt instead.


In gensrc/script/gen_build_version.sh line 228:
if [[ ${build_version_hotfix} > 0 ]]; then
                              ^-- SC2071 (error): > is for string comparisons. Use -gt instead.
```
  • Loading branch information
suxiaogang223 authored Dec 18, 2024
1 parent f167700 commit 011d393
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gensrc/script/gen_build_version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ build_version_hotfix=0
build_version_rc_version=""

build_version="${build_version_prefix}-${build_version_major}.${build_version_minor}.${build_version_patch}"
if [[ ${build_version_hotfix} > 0 ]]; then
if [[ ${build_version_hotfix} -gt 0 ]]; then
build_version+=".${build_version_hotfix}"
fi
build_version+="-${build_version_rc_version}"
Expand Down Expand Up @@ -225,7 +225,7 @@ fi

build_version="${build_version_prefix}-${build_version_major}.${build_version_minor}.${build_version_patch}"

if [[ ${build_version_hotfix} > 0 ]]; then
if [[ ${build_version_hotfix} -gt 0 ]]; then
build_version+=".${build_version_hotfix}"
fi

Expand Down

0 comments on commit 011d393

Please sign in to comment.