Last active
June 3, 2019 19:59
-
-
Save danner26/2e57964ef24ffec2c583eb288ae127be to your computer and use it in GitHub Desktop.
Angular Deploy Script [PROD]
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
###Create and deploy | |
#Build codebase | |
cd $DEV_BASE | |
#overwrite the global.ts with our prod config | |
yes | cp $DEV_BASE/src/app/global_prod.ts $DEV_BASE/src/app/global.ts | |
#run versioning script | |
node $DEV_BASE/src/version.js | |
#Compress JS | |
minify $DEV_BASE/src/assets/js/pipeline.js > $DEV_BASE/src/assets/js/pipeline.min.js | |
minify $DEV_BASE/src/assets/js/theia-sticky-sidebar.js > $DEV_BASE/src/assets/js/theia-sticky-sidebar.min.js | |
minify $DEV_BASE/src/assets/js/util.js > $DEV_BASE/src/assets/js/util.min.js | |
minify $DEV_BASEv/src/assets/js/script.js > $DEV_BASE/src/assets/js/script.min.js | |
ng build --prod | |
#Remove old code and push new code to the html folder | |
rm -rf /var/www/html/* | |
cp -R $DEV_BASE/dist/$DEV_PROJNAME/* /var/www/html/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment