-
Notifications
You must be signed in to change notification settings - Fork 75
/
deploy_amazon_beta.sh
executable file
·43 lines (33 loc) · 1.94 KB
/
deploy_amazon_beta.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# npm version prerelease --preid=beta
version=`node -e 'console.log(require("./package.json").version)'`
echo "version $version"
ng build --prod --env=pre --base-href --output-hashing none --build-optimizer=false
# ########## --->>>> NATIVE-MQTT folder START <<<<<------ ########## #
# cd dist
# aws s3 sync . s3://tiledesk-widget-pre/native-mqtt/widget/$version/
# aws s3 sync . s3://tiledesk-widget-pre/native-mqtt/widget/
# cd ..
# #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/native-mqtt/widget/ and s3://tiledesk-widget-pre/native-mqtt/widget/$version/
# echo available on https://s3.eu-west-1.amazonaws.com/tiledesk-widget-pre/native-mqtt/widget/index.html
# echo https://widget-pre.tiledesk.com/v5/index.html
# echo https://widget-pre.tiledesk.com/v5/$version/index.html
# ########## --->>>> NATIVE-MQTT folder END <<<<<------ ########## #
# ########## --->>>> FIREBASE folder START <<<<<------ ########## #
cd dist
aws s3 sync . s3://tiledesk-widget-pre/v5/$version/
aws s3 sync . s3://tiledesk-widget-pre/v5/
cd ..
#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
echo https://widget-pre.tiledesk.com/v5/index.html
echo https://widget-pre.tiledesk.com/v5/$version/index.html
# ########## --->>>> FIREBASE folder END <<<<<------ ########## #
## AZIONI per committare:
## 1) modificare package.json e package-lock.json aggiungendo il num di versione nuovo
## 2) aggiornare il CHANGELOG
## 3) fare il commit tramite sourcetree
## 4) da terminale richiamare ./deploy_pre.sh