mirror of
https://github.com/wavetermdev/waveterm.git
synced 2024-12-21 16:38:23 +01:00
22 lines
595 B
Bash
22 lines
595 B
Bash
# Takes a release from our staging bucket and publishes it to the public download bucket.
|
|
# Usage: publish-from-staging.sh <version>
|
|
# Example: publish-from-staging.sh 0.1.0
|
|
|
|
# Takes the version as an argument
|
|
VERSION=$1
|
|
if [ -z "$VERSION" ]; then
|
|
echo "Usage: $0 <version>"
|
|
exit
|
|
fi
|
|
|
|
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
|