Skip to content

Commit

Permalink
minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Gabriele Panico committed Oct 14, 2024
1 parent 8223ec9 commit 55b999e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 18 deletions.
13 changes: 5 additions & 8 deletions deploy_amazon_beta.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@ echo "version $version"

ng build --configuration="pre" --aot=true --base-href --build-optimizer=true

### SET HASHING : START ###
cp ./src/launch_template.js ./dist/launch.js
node ./src/build_launch.js
### SET HASHING : END ###

# ########## --->>>> NATIVE-MQTT folder START <<<<<------ ########## #

Expand All @@ -28,10 +24,11 @@ node ./src/build_launch.js

# ########## --->>>> FIREBASE folder START <<<<<------ ########## #
cd dist
aws s3 sync . s3://tiledesk-widget-pre/v5/$version/ --cache-control max-age=300 --exclude='launch.js' #7days
aws s3 sync . s3://tiledesk-widget-pre/v5/$version/ --cache-control "no-store,no-cache,private" --exclude='*' --include='launch.js'
aws s3 sync . s3://tiledesk-widget-pre/v5/ --cache-control max-age=300 --exclude='launch.js' #7days
aws s3 sync . s3://tiledesk-widget-pre/v5/ --cache-control "no-store,no-cache,private" --exclude='*' --include='launch.js'
aws s3 sync . s3://tiledesk-widget-pre/v5/$version/ --cache-control max-age=300
aws s3 sync . s3://tiledesk-widget-pre/v5/ --cache-control max-age=300
cd ..

#aws cloudfront create-invalidation --distribution-id E3EJDWEHY08CZZ --paths "/*"
cd ..

aws cloudfront create-invalidation --distribution-id E2V5O0YPR61V8P --paths "/*"
Expand Down
13 changes: 3 additions & 10 deletions deploy_amazon_prod.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,6 @@ echo "version $version"

# --build-optimizer=false if localstorage is disabled (webview) appears https://github.com/firebase/angularfire/issues/970
ng build --configuration="prod" --aot=true --build-optimizer=true --vendor-chunk=true
##--base-href='./v5/' --output-hashing none

### SET HASHING : START ###
cp ./src/launch_template.js ./dist/launch.js
node ./src/build_launch.js
### SET HASHING : END ###

#### FIREBASE #####
# cd dist
Expand All @@ -21,12 +15,11 @@ node ./src/build_launch.js
# #### MQTT #####
cd dist
# aws s3 sync . s3://tiledesk-widget/v5/latest/
aws s3 sync . s3://tiledesk-widget/v6/$version/ --cache-control max-age=86400 --exclude='launch.js' #8days
aws s3 sync . s3://tiledesk-widget/v6/$version/ --cache-control "no-store,no-cache,private" --exclude='*' --include='launch.js'
aws s3 sync . s3://tiledesk-widget/v6/ --cache-control max-age=86400 --exclude='launch.js' #8days
aws s3 sync . s3://tiledesk-widget/v6/ --cache-control "no-store,no-cache,private" --exclude='*' --include='launch.js'
aws s3 sync . s3://tiledesk-widget/v6/$version/ --cache-control max-age=300
aws s3 sync . s3://tiledesk-widget/v6/ --cache-control max-age=300
cd ..


aws cloudfront create-invalidation --distribution-id E3EJDWEHY08CZZ --paths "/*"
echo new version deployed $version on s3://tiledesk-widget/v5
echo available on https://s3.eu-west-1.amazonaws.com/tiledesk-widget/v5/index.html
Expand Down

0 comments on commit 55b999e

Please sign in to comment.