upload current + legacy install scripts to s3 with every release

This commit is contained in:
Tamar Ben-Shachar
2016-03-02 14:42:59 -08:00
parent 3a27949302
commit 42641148f5

View File

@@ -1,38 +1,25 @@
#!/bin/bash -x
COSMOS_VERSION="0.4.0"
aws s3 --region=us-east-1 cp \
dcos-cli/bin/install/install-dcos-cli.sh \
%aws.bash_destination_url%
cosmos_cli()
{
# result is the larger of the two versions
# convert the str to numbers, sort, and return the larger
result=$(echo -e "$COSMOS_VERSION\n$TAG_VERSION" | sed '/^$/d' | sort -nr | head -1)
# if TAGGED_VERSION >= COSMOS_VERSION we want to use cosmos cli
[[ "$result" = "$TAG_VERSION" ]]
}
aws s3 --region=us-east-1 cp \
dcos-cli/bin/install/install-optout-dcos-cli.sh \
%aws.bash_optout_destination_url%
if cosmos_cli ; then
aws s3 --region=us-east-1 cp \
dcos-cli/bin/install/install-dcos-cli.sh \
%aws.bash_destination_url%
aws s3 --region=us-east-1 cp \
dcos-cli/win_bin/install/install-dcos-cli.ps1 \
%aws.powershell_destination_url%
aws s3 --region=us-east-1 cp \
dcos-cli/bin/install/install-optout-dcos-cli.sh \
%aws.bash_optout_destination_url%
aws s3 --region=us-east-1 cp \
dcos-cli/bin/install/legacy/install-legacy-dcos-cli.sh \
%aws.bash_legacy_destination_url%
aws s3 --region=us-east-1 cp \
dcos-cli/win_bin/install/install-dcos-cli.ps1 \
%aws.powershell_destination_url%
else
aws s3 --region=us-east-1 cp \
dcos-cli/bin/install/legacy/install-legacy-dcos-cli.sh \
%aws.legacy_bash_destination_url%
aws s3 --region=us-east-1 cp \
dcos-cli/bin/install/install-legacy_optout-dcos-cli.sh \
%aws.bash_legacy_optout_destination_url%
aws s3 --region=us-east-1 cp \
dcos-cli/bin/install/install-legacy_optout-dcos-cli.sh \
%aws.bash_legacy_optout_destination_url%
aws s3 --region=us-east-1 cp \
dcos-cli/win_bin/install/legacy/install-legacy-dcos-cli.ps1 \
%aws.legacy_powershell_destination_legacy_url%
fi
aws s3 --region=us-east-1 cp \
dcos-cli/win_bin/install/legacy/install-legacy-dcos-cli.ps1 \
%aws.powershell_legacy_destination_legacy_url%