Skip to content

Commit

Permalink
Fixed auto-activate
Browse files Browse the repository at this point in the history
  • Loading branch information
Joost de Vries committed Jul 30, 2015
1 parent b786d99 commit 9b94050
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions scripts/travis-deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,9 @@ fi

if [ "$TRAVIS_BRANCH" == "master" ]; then
# Deploy to staging on a merge to master
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
ember deploy --environment staging && ember deploy:activate --environment staging --revision=`ember deploy:list --environment staging | grep '1)' | awk {'print $2'}`

elif [ "$TRAVIS_TAG" != "false" ]; then
# Deploy to production on a merge to release
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
# Deploy to production on a tag
ember deploy --environment production && ember deploy:activate --environment production --revision=`ember deploy:list --environment production | grep '1)' | awk {'print $2'}`
fi

0 comments on commit 9b94050

Please sign in to comment.