From f89dfde639333c15e0bd73fde99d09973c153396 Mon Sep 17 00:00:00 2001 From: Sergey Ratiashvili Date: Mon, 11 Mar 2024 14:34:18 +0400 Subject: [PATCH] chore: meh --- integration_tests/dockerfiles/gaia/build.sh | 31 ++++++++++----------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/integration_tests/dockerfiles/gaia/build.sh b/integration_tests/dockerfiles/gaia/build.sh index 20a92461..77c67d52 100755 --- a/integration_tests/dockerfiles/gaia/build.sh +++ b/integration_tests/dockerfiles/gaia/build.sh @@ -2,27 +2,26 @@ DIR="$(dirname $0)" cd $DIR VERSION=$(cat ../../package.json | jq -r '.version') +git clone https://github.com/cosmos/gaia.git -b v14.1.0 +cp ./Dockerfile ./gaia if [[ "$CI" == "true" ]]; then VERSION="_$VERSION" ORG=neutronorg/lionco-contracts: else VERSION=":$VERSION" + new_replace="github.com/cosmos/ibc-go/v4 v4.4.2 => github.com/ratik/ibc-go/v4 v4.4.3-0.20231115171220-5c22b66cfa8c" + gomod_file="gaia/go.mod" + cp "$gomod_file" "$gomod_file.bak" + awk -v new_replace="$new_replace" ' + BEGIN { replace_block=0; added=0 } + /replace[[:space:]]*\(/ { replace_block=1 } + /^[[:space:]]*\)/ { if(replace_block) { print new_replace; added=1; replace_block=0 } } + { print } + END { if(!added) { print "replace ("; print new_replace; print ")" } } + ' "$gomod_file.bak" > "$gomod_file" + cd gaia + go mod tidy + cd .. fi -git clone https://github.com/cosmos/gaia.git -b v14.1.0 -cp ./Dockerfile ./gaia - -new_replace="github.com/cosmos/ibc-go/v4 v4.4.2 => github.com/ratik/ibc-go/v4 v4.4.3-0.20231115171220-5c22b66cfa8c" -gomod_file="gaia/go.mod" -cp "$gomod_file" "$gomod_file.bak" -awk -v new_replace="$new_replace" ' -BEGIN { replace_block=0; added=0 } -/replace[[:space:]]*\(/ { replace_block=1 } -/^[[:space:]]*\)/ { if(replace_block) { print new_replace; added=1; replace_block=0 } } -{ print } -END { if(!added) { print "replace ("; print new_replace; print ")" } } -' "$gomod_file.bak" > "$gomod_file" -cd gaia -go mod tidy -cd .. docker build gaia -t ${ORG}gaia-test${VERSION} rm -rf ./gaia \ No newline at end of file