Skip to content

Commit

Permalink
Fix snapshot script not working on unix runners
Browse files Browse the repository at this point in the history
  • Loading branch information
bentrengrove committed Oct 7, 2022
1 parent fab8511 commit 1079eaa
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions scripts/test_snapshot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
# ./scripts/test_snapshot.sh
#
########################################################################
set -e
set -xe

if [ -z "$1" ]; then
read -p "Enter compose version e.g. 1.3.0: " compose_ver
Expand All @@ -40,7 +40,11 @@ export COMPOSE_SNAPSHOT_ID=$snapshot

# Switch version to SNAPSHOT
cp ./scripts/libs.versions.toml ./scripts/libs.versions.toml.tmp
sed -i '' -e 's/^compose = ".*"/compose = "'$compose_ver'-SNAPSHOT"/g' ./scripts/libs.versions.toml
if [[ "$OSTYPE" == "darwin"* ]]; then
sed -i '' -e 's/^compose = ".*"/compose = "'$compose_ver'-SNAPSHOT"/g' ./scripts/libs.versions.toml
else
sed -i -e 's/^compose = ".*"/compose = "'$compose_ver'-SNAPSHOT"/g' ./scripts/libs.versions.toml
fi

# Copy to all samples and verify
./scripts/duplicate_version_config.sh
Expand Down

0 comments on commit 1079eaa

Please sign in to comment.