Skip to content

Commit

Permalink
hash removed
Browse files Browse the repository at this point in the history
  • Loading branch information
Gabriele Panico committed Jan 8, 2024
1 parent b795c10 commit 6826957
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 22 deletions.
15 changes: 4 additions & 11 deletions deploy_amazon_beta.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,7 @@
version=`node -e 'console.log(require("./package.json").version)'`
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 ###
ng build --configuration="pre" --aot=true --base-href --output-hashing none --build-optimizer=true

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

Expand All @@ -28,13 +23,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 E2V5O0YPR61V8P --paths "/*"
#aws cloudfront create-invalidation --distribution-id E3EJDWEHY08CZZ --paths "/*"
# echo new version deployed $NEW_VER/$NEW_BUILD/ on s3://tiledesk-widget-pre/v2
echo new version deployed $version/ on s3://tiledesk-widget-pre/v5 and s3://tiledesk-widget-pre/v5/$version/
echo available on https://s3.eu-west-1.amazonaws.com/tiledesk-widget-pre/v5/index.html
Expand Down
15 changes: 4 additions & 11 deletions deploy_amazon_prod.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,7 @@ version=`node -e 'console.log(require("./package.json").version)'`
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 ###
ng build --configuration="prod" --aot=true --base-href --output-hashing none --build-optimizer=true --vendor-chunk=true

#### FIREBASE #####
# cd dist
Expand All @@ -18,13 +12,12 @@ node ./src/build_launch.js
# aws s3 sync . s3://tiledesk-widget/v5/ --cache-control max-age=300
# cd ..


# #### 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 "/*"
Expand Down

0 comments on commit 6826957

Please sign in to comment.