From c965b80a50938e6908bef7c1858f10a39ca8a968 Mon Sep 17 00:00:00 2001 From: roy-dydx <133032749+roy-dydx@users.noreply.github.com> Date: Wed, 4 Sep 2024 13:12:45 -0400 Subject: [PATCH] Build image with different pre and post upgrade versions for testnet (#2187) --- protocol/testing/testnet/testnet.sh | 6 +++--- protocol/testing/version/version.sh | 6 ++++++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/protocol/testing/testnet/testnet.sh b/protocol/testing/testnet/testnet.sh index 903ed4bbaf..b60eee3798 100755 --- a/protocol/testing/testnet/testnet.sh +++ b/protocol/testing/testnet/testnet.sh @@ -16,11 +16,11 @@ install_prerequisites() { set_cosmovisor_binary_permissions() { # Set up upgrade binaries. - for version in "${!version_to_url[@]}"; do + for version in "${!testnet_version_to_url[@]}"; do echo "Setting up version ${version}..." version_dir="$HOME/cosmovisor/upgrades/$version" mkdir -p "$version_dir/bin" - url=${version_to_url[$version]} + url=${testnet_version_to_url[$version]} tar_file=$(basename $url) echo "Downloading tar file from ${url}..." @@ -32,7 +32,7 @@ set_cosmovisor_binary_permissions() { chmod 755 "$version_dir/bin/dydxprotocold" echo "Successfully set up $version_dir/bin/dydxprotocold" done - current_version_path="$HOME/cosmovisor/upgrades/$CURRENT_VERSION/bin" + current_version_path="$HOME/cosmovisor/upgrades/$TESTNET_CURRENT_VERSION/bin" mkdir -p $current_version_path cp /bin/dydxprotocold $current_version_path } diff --git a/protocol/testing/version/version.sh b/protocol/testing/version/version.sh index 6465b7f6ee..469f7a9ec8 100755 --- a/protocol/testing/version/version.sh +++ b/protocol/testing/version/version.sh @@ -3,6 +3,12 @@ CURRENT_VERSION=$(