Skip to content

Commit

Permalink
Automatic activation (hopefully)
Browse files Browse the repository at this point in the history
  • Loading branch information
Joost de Vries committed Jul 30, 2015
1 parent adcf7b0 commit ade15d0
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions scripts/travis-deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,17 @@ fi

if [ "$TRAVIS_BRANCH" == "master" ]; then
# Deploy to staging on a merge to master
ember deploy -e staging
ember deploy --environment staging
list=`ember deploy:list --environment staging`
rev=`echo $list | sed -n "s/.*revisions: | [=>[:space:]]*\([^[:space:]]*\).*/\1/p"`
printf "Activating $rev \n"
ember deploy:activate --revision $rev --environment staging

elif [ "$TRAVIS_TAG" != "false" ]; then
# Deploy to production on a merge to release
ember deploy -e production
ember deploy --environment production
list=`ember deploy:list --environment production`
rev=`echo $list | sed -n "s/.*revisions: | [=>[:space:]]*\([^[:space:]]*\).*/\1/p"`
printf "Activating $rev \n"
ember deploy:activate --revision $rev --environment production
fi

0 comments on commit ade15d0

Please sign in to comment.