From 1079eaa52d7abf0eea9ae3c0a5d0fe7d2d4cd0a4 Mon Sep 17 00:00:00 2001 From: Ben Trengrove Date: Fri, 7 Oct 2022 08:52:38 -0700 Subject: [PATCH] Fix snapshot script not working on unix runners --- scripts/test_snapshot.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/scripts/test_snapshot.sh b/scripts/test_snapshot.sh index 18e357334..f0694d9db 100755 --- a/scripts/test_snapshot.sh +++ b/scripts/test_snapshot.sh @@ -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 @@ -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