Skip to content
This repository has been archived by the owner on Feb 10, 2021. It is now read-only.

Commit

Permalink
fix: re-create app on build
Browse files Browse the repository at this point in the history
  • Loading branch information
joscha committed Apr 6, 2016
1 parent 7d949b9 commit 6bbfdee
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .travis.yml
Expand Up @@ -49,4 +49,4 @@ env:
- secure: "ADkRhMtW2uzNT8gPxKuBYE5tc1WCSrtWKvEy2wpOehR8KbpN5PYnYk7rWE3H4YnRwSXn38VuTVL2Lyc4HWNB3VWqSLeIegzQQ0ie5Yt5DtG6lbgYXWtgUsUsH1E5H/ozKhthfDASCONHv0zqZC6sJci6EAT+HiX80ilQ0h386jA="
after_success:
- '[[ $TRAVIS_BRANCH == "master" ]] && { cd $TRAVIS_BUILD_DIR/code && sbt --info ++$TRAVIS_SCALA_VERSION -Dtravis=1 publish; };'
- '[[ $TRAVIS_BRANCH == "master" ]] && { cd $TRAVIS_BUILD_DIR/samples/java/play-authenticate-usage && sbt --info ++$TRAVIS_SCALA_VERSION stage deployHeroku; };'
- '[[ $TRAVIS_BRANCH == "master" ]] && { $TRAVIS_BUILD_DIR/scripts/setup-app.sh && cd $TRAVIS_BUILD_DIR/samples/java/play-authenticate-usage && sbt --info ++$TRAVIS_SCALA_VERSION stage deployHeroku; };'
11 changes: 11 additions & 0 deletions scripts/setup-app.sh
@@ -0,0 +1,11 @@
#!/bin/sh

curl -X POST https://api.heroku.com/apps \
-H "Accept: application/vnd.heroku+json; version=3" \
-H "Authorization: Bearer $HEROKU_API_KEY" \
-H "Content-Type: application/json" \
-d "{\"name\":\"play-authenticate\"}"

curl -X DELETE https://api.heroku.com/apps/play-authenticate \
-H "Accept: application/vnd.heroku+json; version=3" \
-H "Authorization: Bearer $HEROKU_API_KEY"

0 comments on commit 6bbfdee

Please sign in to comment.