1
0
mirror of https://github.com/moparisthebest/mail synced 2024-08-13 16:43:47 -04:00
mail/res/aws_release.sh

35 lines
685 B
Bash
Raw Normal View History

2014-10-20 09:00:20 -04:00
#!/bin/sh
# go to root
cd `dirname $0`
cd ..
# 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
2014-10-22 14:24:36 -04:00
grunt release-$1 --release=$2
grunt test
2014-10-20 09:00:20 -04:00
# 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
2014-10-22 03:42:42 -04:00
sed -i "" '/dist/d' .gitignore
sed -i "" '/node_modules/d' .gitignore
git add .gitignore node_modules/ dist/
2014-10-20 09:00:20 -04:00
git commit -m "Update aws-dist"
# push to aws
git aws.push
# switch back to master branch
git checkout master