Skip to content

Commit

Permalink
chore: meh
Browse files Browse the repository at this point in the history
  • Loading branch information
ratik authored and foxpy committed Mar 11, 2024
1 parent 79a850a commit f89dfde
Showing 1 changed file with 15 additions and 16 deletions.
31 changes: 15 additions & 16 deletions integration_tests/dockerfiles/gaia/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit f89dfde

Please sign in to comment.