-
Notifications
You must be signed in to change notification settings - Fork 98
/
Copy pathdeploy_prod.sh
executable file
·27 lines (19 loc) · 1.03 KB
/
deploy_prod.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# npm version patch
# version=`node -e 'console.log(require("./package.json").version)'`
# echo "version $version"
# if [ "$version" != "" ]; then
# git tag -a "v$version" -m "`git log -1 --format=%s`"
# echo "Created a new tag, v$version"
# git push --tags
# npm publish
# fi
node --max_old_space_size=8192 node_modules/@angular/cli/bin/ng build --configuration production --output-path=dist --base-href ./
cd dist
aws s3 sync --cache-control max-age=172800 . s3://panel.tiledesk.com/v3/dashboard/
aws cloudfront create-invalidation --distribution-id E2D4FS8NGUODM4 --paths "/*"
echo new version deployed on s3://panel.tiledesk.com/v3/dashboard/
echo available on https://panel.tiledesk.com/v3/dashboard/index.html
# aws s3 sync --cache-control max-age=172800 . s3://panel.tiledesk.com/v3/dashboard/snx
# aws cloudfront create-invalidation --distribution-id E2D4FS8NGUODM4 --paths "/*"
# echo new version deployed on s3://panel.tiledesk.com/v3/dashboard/snx
# echo available on https://panel.tiledesk.com/v3/dashboard/snx/index.html