Skip to content

Commit

Permalink
fix: version comparision in run_upgrade_commands.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
Yaru Wang committed Aug 14, 2023
1 parent fdce9b8 commit 1583e17
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions contrib/scripts/upgrade_test_scripts/run_gaia.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ if ! test -f "./build/gaiadnew"; then
exit
fi

mkdir -p "$NODE_HOME"/cosmovisor/upgrades/"$UPGRADE_VERSION_NUMBE"/bin
cp ./build/gaiadnew "$NODE_HOME"/cosmovisor/upgrades/"$UPGRADE_VERSION_NUMBE"/bin/gaiad
mkdir -p "$NODE_HOME"/cosmovisor/upgrades/"$UPGRADE_VERSION_NUMBER"/bin
cp ./build/gaiadnew "$NODE_HOME"/cosmovisor/upgrades/"$UPGRADE_VERSION_NUMBER"/bin/gaiad

GOPATH=$(go env GOPATH)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ for dir in "$UPGRADES_DIR"/*; do
if [ -d "$dir" ]; then
DIR_NAME=$(basename "$dir")
VERSION_NUMBER="${DIR_NAME#v}"
if (($VERSION_NUMBER > $UPGRADE_VERSION_NUMBER)); then
if [ "$VERSION_NUMBER" -gt "$UPGRADE_VERSION_NUMBER" ]; then
UPGRADE_VERSION_NUMBER=$VERSION_NUMBER
fi
fi
Expand Down

0 comments on commit 1583e17

Please sign in to comment.