Migrate to EB v3.x CLI and Frankfurt region

dev/WO-783
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/
release/
test/integration/src/
.elasticbeanstalk/
test/*/index.js
**/*.browserified.js
**/*.js.map

View File

@ -455,7 +455,7 @@ module.exports = function(grunt) {
});
grunt.registerTask('manifest-test', function() {
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({
@ -465,9 +465,9 @@ module.exports = function(grunt) {
deleteKey: true
});
});
grunt.registerTask('manifest-stable', function() {
grunt.registerTask('manifest-prod', function() {
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({
@ -509,7 +509,7 @@ module.exports = function(grunt) {
grunt.registerTask('release-dev', ['dist', 'manifest-dev', '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']);
};

View File

@ -4,16 +4,22 @@
cd `dirname $0`
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
git checkout aws-dist
git merge master --no-edit
git checkout $2
git branch release/$1
git checkout release/$1
git merge $2 --no-edit
# build and test
rm -rf node_modules/
npm cache clear
npm install
grunt release-$1 --release=$2
grunt test
grunt release-$1 --release=$3
# install only production dependencies
rm -rf node_modules/
@ -26,10 +32,10 @@ find node_modules/ -name ".gitignore" -exec rm -rf {} \;
sed -i "" '/dist/d' .gitignore
sed -i "" '/node_modules/d' .gitignore
git add .gitignore node_modules/ dist/
git commit -m "Update aws-dist"
git commit -m "Update release"
# push to aws
git aws.push
eb deploy
# switch back to master branch
git checkout master
# switch back to $2 branch
git checkout $2