Merge pull request #213 from trezor/fix/build-scripts

Fix/build scripts
pull/215/head
Vladimir Volek 6 years ago committed by GitHub
commit 0ccc0d3367
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -13,7 +13,7 @@ if [[ "$1" == "dev" || "$1" == "beta" || "$1" == "stable" ]]
docker stop trezor-wallet docker stop trezor-wallet
docker rm trezor-wallet docker rm trezor-wallet
echo "DONE!" echo "DONE!"
echo "Build directory: "$1 echo "Build directory: build/"$1
else else
echo "invalid parameters... valid parameters are (dev, beta, stable)" echo "invalid parameters... valid parameters are (dev, beta, stable)"
fi fi

@ -4,6 +4,17 @@
# Install awscli (pip install awscli) # Install awscli (pip install awscli)
# Configure access credentials (aws configure), region is "eu-central-1" # Configure access credentials (aws configure), region is "eu-central-1"
# Usage:
# ./s3sync.sh DESTINATION SOURCE [clear]
# @DESTINATION: required, destination server
# @SOURCE: required, build
# @CLEAR: optional, delete previous uploads
# ./s3sync.sh stage beta
# ./s3sync.sh stage stable
# ./s3sync.sh stage stable clear
# ./s3sync.sh beta beta
# ./s3sync.sh stable stable
function confirm { function confirm {
read -r -p "Are you sure? [y/N] " response read -r -p "Are you sure? [y/N] " response
if [[ $response =~ ^(yes|y)$ ]]; then if [[ $response =~ ^(yes|y)$ ]]; then
@ -17,7 +28,7 @@ function confirm {
# Validate params # Validate params
if [ "x$1" == "x" ] || [ "x$2" == "x" ]; then if [ "x$1" == "x" ] || [ "x$2" == "x" ]; then
echo "Invalid params" echo "Invalid params"
echo "./s3sync.sh beta|stable stage|beta|stable [clear]" echo "./s3sync.sh stage|beta|stable beta|stable [clear]"
exit 1 exit 1
fi fi
@ -61,15 +72,15 @@ if [ "x$1" == "xbeta" ] || [ "x$1" == "xstable" ]; then
confirm confirm
fi fi
# set -e set -e
# cd `dirname $0` cd `dirname $0`
# if [ "x$3" == "x-d" ]; then if [ "x$3" == "x-clear" ]; then
# aws s3 sync --delete --cache-control 'public, max-age=3600' $SOURCE s3://$BUCKET/next aws s3 sync --delete --cache-control 'public, max-age=3600' $SOURCE s3://$BUCKET/next
# else else
# aws s3 sync --cache-control 'public, max-age=3600' $SOURCE s3://$BUCKET/next aws s3 sync --cache-control 'public, max-age=3600' $SOURCE s3://$BUCKET/next
# fi fi
# aws cloudfront create-invalidation --distribution-id $DISTRIBUTION_ID --paths '/next/*' aws cloudfront create-invalidation --distribution-id $DISTRIBUTION_ID --paths '/next/*'
echo "DONE" echo "DONE"
Loading…
Cancel
Save