Skip to content
This repository has been archived by the owner on Aug 9, 2023. It is now read-only.

Commit

Permalink
freeze release versions of assets
Browse files Browse the repository at this point in the history
  • Loading branch information
wleepang committed Feb 29, 2020
1 parent 7cc7978 commit cf51636
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions _scripts/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ function s3_uri() {


function artifacts() {
# root level is always "latest"
S3_URI=$(s3_uri $ASSET_BUCKET $ASSET_STAGE_PATH "artifacts")

echo "publishing artifacts: $S3_URI"
Expand All @@ -32,9 +33,22 @@ function artifacts() {
--delete \
./artifacts \
$S3_URI

if [[ $USE_RELEASE_TAG && ! -z "$TRAVIS_TAG" ]]; then
S3_URI=$(s3_uri $ASSET_BUCKET $ASSET_STAGE_PATH $TRAVIS_TAG "artifacts")

echo "publishing artifacts: $S3_URI"
aws s3 sync \
--profile asset-publisher \
--acl public-read \
--delete \
./artifacts \
$S3_URI
fi
}

function templates() {
# root level is always "latest"
S3_URI=$(s3_uri $ASSET_BUCKET $ASSET_STAGE_PATH "templates")

echo "publishing templates: $S3_URI"
Expand All @@ -45,6 +59,19 @@ function templates() {
--metadata commit=$(git rev-parse HEAD) \
./src/templates \
$S3_URI

if [[ $USE_RELEASE_TAG && ! -z "$TRAVIS_TAG" ]]; then
S3_URI=$(s3_uri $ASSET_BUCKET $ASSET_STAGE_PATH $TRAVIS_TAG "templates")

echo "publishing templates: $S3_URI"
aws s3 sync \
--profile asset-publisher \
--acl public-read \
--delete \
--metadata commit=$(git rev-parse HEAD) \
./src/templates \
$S3_URI
fi
}

function site() {
Expand All @@ -66,6 +93,7 @@ echo "DEPLOYMENT STAGE: $ASSET_STAGE"
case $ASSET_STAGE in
production)
ASSET_STAGE_PATH=""
USE_RELEASE_TAG=1
all
;;
test)
Expand Down

0 comments on commit cf51636

Please sign in to comment.