Skip to content

Commit

Permalink
ci: make release script add osmosis flag if needed
Browse files Browse the repository at this point in the history
  • Loading branch information
kerber0x committed Jan 16, 2024
1 parent bc54640 commit b0f46ac
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions scripts/build_release.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#!/usr/bin/env bash
set -e

projectRootPath=$(realpath "$0" | sed 's|\(.*\)/.*|\1|' | cd ../ | pwd)

# Displays tool usage
function display_usage() {
echo "Release builder"
Expand Down Expand Up @@ -33,6 +35,18 @@ case $chain in

osmosis)
flag="-osmosis"
echo " $projectRootPath/Cargo.toml"

# backup the Cargo.toml file
cp $projectRootPath/Cargo.toml $projectRootPath/Cargo.toml.bak

# add the osmosis feature flag to the Cargo.toml file so it optimizes correctly
if [[ "$(uname)" == "Darwin" ]]; then
sed -i '' '/white-whale =/ s/features = \[\]/features = \["osmosis"\]/' $projectRootPath/Cargo.toml
else
sed -i '/white-whale =/ s/features = \[\]/features = \["osmosis"\]/' $projectRootPath/Cargo.toml
fi

;;
juno | terra | chihuahua)
flag="-osmosis_token_factory"
Expand Down Expand Up @@ -84,3 +98,8 @@ $projectRootPath/scripts/check_artifacts_size.sh

# Check generated wasm file sizes
$projectRootPath/scripts/get_artifacts_versions.sh

if [[ "$chain" == "osmosis" ]]; then
#if the chain is osmosis, restore the Cargo.toml file
mv $projectRootPath/Cargo.toml.bak $projectRootPath/Cargo.toml
fi

0 comments on commit b0f46ac

Please sign in to comment.