This repository was archived by the owner on Aug 9, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed
Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ function s3_uri() {
2323
2424
2525function artifacts() {
26+ # root level is always "latest"
2627 S3_URI=$( s3_uri $ASSET_BUCKET $ASSET_STAGE_PATH " artifacts" )
2728
2829 echo " publishing artifacts: $S3_URI "
@@ -32,9 +33,22 @@ function artifacts() {
3233 --delete \
3334 ./artifacts \
3435 $S3_URI
36+
37+ if [[ $USE_RELEASE_TAG && ! -z " $TRAVIS_TAG " ]]; then
38+ S3_URI=$( s3_uri $ASSET_BUCKET $ASSET_STAGE_PATH $TRAVIS_TAG " artifacts" )
39+
40+ echo " publishing artifacts: $S3_URI "
41+ aws s3 sync \
42+ --profile asset-publisher \
43+ --acl public-read \
44+ --delete \
45+ ./artifacts \
46+ $S3_URI
47+ fi
3548}
3649
3750function templates() {
51+ # root level is always "latest"
3852 S3_URI=$( s3_uri $ASSET_BUCKET $ASSET_STAGE_PATH " templates" )
3953
4054 echo " publishing templates: $S3_URI "
@@ -45,6 +59,19 @@ function templates() {
4559 --metadata commit=$( git rev-parse HEAD) \
4660 ./src/templates \
4761 $S3_URI
62+
63+ if [[ $USE_RELEASE_TAG && ! -z " $TRAVIS_TAG " ]]; then
64+ S3_URI=$( s3_uri $ASSET_BUCKET $ASSET_STAGE_PATH $TRAVIS_TAG " templates" )
65+
66+ echo " publishing templates: $S3_URI "
67+ aws s3 sync \
68+ --profile asset-publisher \
69+ --acl public-read \
70+ --delete \
71+ --metadata commit=$( git rev-parse HEAD) \
72+ ./src/templates \
73+ $S3_URI
74+ fi
4875}
4976
5077function site() {
@@ -66,6 +93,7 @@ echo "DEPLOYMENT STAGE: $ASSET_STAGE"
6693case $ASSET_STAGE in
6794 production)
6895 ASSET_STAGE_PATH=" "
96+ USE_RELEASE_TAG=1
6997 all
7098 ;;
7199 test)
You can’t perform that action at this time.
0 commit comments