Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix snapshot script not working on unix runners #994

Merged
merged 1 commit into from
Oct 7, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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