diff --git a/deploy_amazon_beta.sh b/deploy_amazon_beta.sh index 567c152c..32dead64 100755 --- a/deploy_amazon_beta.sh +++ b/deploy_amazon_beta.sh @@ -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 <<<<<------ ########## # @@ -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 "/*" diff --git a/deploy_amazon_prod.sh b/deploy_amazon_prod.sh index 8ff3dcfd..481470a0 100755 --- a/deploy_amazon_prod.sh +++ b/deploy_amazon_prod.sh @@ -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 @@ -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