From eab2cb616d1fdebc5d620e4d2e0b72b8b579c931 Mon Sep 17 00:00:00 2001 From: Evan Simkowitz Date: Fri, 8 Mar 2024 15:16:55 -0800 Subject: [PATCH] output dl links (#414) --- buildres/publish-from-staging.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/buildres/publish-from-staging.sh b/buildres/publish-from-staging.sh index 5835049b3..fa25e5f59 100644 --- a/buildres/publish-from-staging.sh +++ b/buildres/publish-from-staging.sh @@ -9,4 +9,13 @@ if [ -z "$VERSION" ]; then exit fi -aws s3 cp s3://waveterm-github-artifacts/staging/$VERSION/ s3://dl.waveterm.dev/releases/ --recursive --profile $AWS_PROFILE \ No newline at end of file +ORIGIN="waveterm-github-artifacts/staging/$VERSION/" +DESTINATION="dl.waveterm.dev/releases/" + +OUTPUT=$(aws s3 cp s3://$ORIGIN s3://$DESTINATION --recursive --profile $AWS_PROFILE) + +for line in $OUTPUT; do + PREFIX=${line%%${DESTINATION}*} + SUFFIX=${line:${#PREFIX}} + echo "https://$SUFFIX" +done