2014-10-20 09:00:20 -04:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
# go to root
|
|
|
|
cd `dirname $0`
|
|
|
|
cd ..
|
|
|
|
|
2014-10-20 10:41:19 -04:00
|
|
|
# switch branch
|
|
|
|
git checkout aws-dist
|
|
|
|
git merge master --no-edit
|
|
|
|
|
2014-10-20 09:00:20 -04:00
|
|
|
# build and test
|
|
|
|
rm -rf node_modules/
|
|
|
|
npm cache clear
|
|
|
|
npm install
|
|
|
|
npm test
|
|
|
|
|
|
|
|
# install only production dependencies
|
|
|
|
rm -rf node_modules/
|
|
|
|
npm install --production
|
|
|
|
|
|
|
|
# delete .gitignore files before adding to git for aws deployment
|
|
|
|
find node_modules/ -name ".gitignore" -exec rm -rf {} \;
|
|
|
|
|
|
|
|
# Add runtime dependencies to git
|
|
|
|
git add node_modules/ dist/
|
|
|
|
git commit -m "Update aws-dist"
|
|
|
|
|
|
|
|
# push to aws
|
2014-10-20 10:41:19 -04:00
|
|
|
git aws.push
|
|
|
|
|
|
|
|
# switch back to master branch
|
|
|
|
git checkout master
|