1
0
mirror of https://github.com/moparisthebest/mail synced 2024-12-21 23:08:50 -05:00

Migrate to EB v3.x CLI and Frankfurt region

This commit is contained in:
Tankred Hase 2014-10-31 16:03:16 +01:00
parent 168a794708
commit 568ccebcc1
4 changed files with 30 additions and 13 deletions

View File

@ -0,0 +1,12 @@
branch-defaults:
release/prod:
environment: mail-html5-prod
release/test:
environment: mail-html5-test
global:
application_name: mail-html5
default_ec2_keyname: null
default_platform: Node.js
default_region: eu-central-1
profile: eb-cli
sc: git

1
.gitignore vendored
View File

@ -7,7 +7,6 @@ src/css/
dist/ dist/
release/ release/
test/integration/src/ test/integration/src/
.elasticbeanstalk/
test/*/index.js test/*/index.js
**/*.browserified.js **/*.browserified.js
**/*.js.map **/*.js.map

View File

@ -455,7 +455,7 @@ module.exports = function(grunt) {
}); });
grunt.registerTask('manifest-test', function() { grunt.registerTask('manifest-test', function() {
if (!version) { if (!version) {
throw new Error('You must specify the version: "--release=1.0"'); throw new Error('You must specify the version: "--release=1.0.0"');
} }
patchManifest({ patchManifest({
@ -465,9 +465,9 @@ module.exports = function(grunt) {
deleteKey: true deleteKey: true
}); });
}); });
grunt.registerTask('manifest-stable', function() { grunt.registerTask('manifest-prod', function() {
if (!version) { if (!version) {
throw new Error('You must specify the version: "--release=1.0"'); throw new Error('You must specify the version: "--release=1.0.0"');
} }
patchManifest({ patchManifest({
@ -509,7 +509,7 @@ module.exports = function(grunt) {
grunt.registerTask('release-dev', ['dist', 'manifest-dev', 'compress']); grunt.registerTask('release-dev', ['dist', 'manifest-dev', 'compress']);
grunt.registerTask('release-test', ['dist', 'manifest-test', 'clean:release', 'compress']); grunt.registerTask('release-test', ['dist', 'manifest-test', 'clean:release', 'compress']);
grunt.registerTask('release-stable', ['dist', 'manifest-stable', 'clean:release', 'compress']); grunt.registerTask('release-prod', ['dist', 'manifest-prod', 'clean:release', 'compress']);
grunt.registerTask('default', ['release-dev']); grunt.registerTask('default', ['release-dev']);
}; };

View File

@ -4,16 +4,22 @@
cd `dirname $0` cd `dirname $0`
cd .. cd ..
if [ "$#" -ne 3 ] || [ "$1" != "prod" ] && [ "$1" != "test" ] ; then
echo 'Usage: ./res/aws_release prod|test from-branch 1.0.0'
exit 0
fi
# switch branch # switch branch
git checkout aws-dist git checkout $2
git merge master --no-edit git branch release/$1
git checkout release/$1
git merge $2 --no-edit
# build and test # build and test
rm -rf node_modules/ rm -rf node_modules/
npm cache clear npm cache clear
npm install npm install
grunt release-$1 --release=$2 grunt release-$1 --release=$3
grunt test
# install only production dependencies # install only production dependencies
rm -rf node_modules/ rm -rf node_modules/
@ -26,10 +32,10 @@ find node_modules/ -name ".gitignore" -exec rm -rf {} \;
sed -i "" '/dist/d' .gitignore sed -i "" '/dist/d' .gitignore
sed -i "" '/node_modules/d' .gitignore sed -i "" '/node_modules/d' .gitignore
git add .gitignore node_modules/ dist/ git add .gitignore node_modules/ dist/
git commit -m "Update aws-dist" git commit -m "Update release"
# push to aws # push to aws
git aws.push eb deploy
# switch back to master branch # switch back to $2 branch
git checkout master git checkout $2