Created
March 5, 2020 15:53
-
-
Save sirtimbly/c09a68e983cde372ab25d9a215fa353d to your computer and use it in GitHub Desktop.
Heroku Deploy a Slug from One App to Another
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -i -n -X GET https://api.heroku.com/apps/$STAGING_APP_NAME/releases \ system | |
-H "Accept: application/vnd.heroku+json; version=3;" -H "Range: version ..; order=desc" | |
# EXTRACT THE SLUG ID OUT OF THAT JSON OBJECT | |
# RELEASE THAT SLUG | |
curl -X POST -H "Accept: application/vnd.heroku+json; version=3" -n \ system | |
-H "Content-Type: application/json" \ | |
-d '{"slug": "$SLUG_ID"}' \ | |
https://api.heroku.com/apps/$PROD_APP_NAME/releases | |
# RESTART ALL DYNOS | |
curl -n -X DELETE https://api.heroku.com/apps/$PROD_APP_NAME/dynos \ | |
-H "Content-Type: application/json" \ | |
-H "Accept: application/vnd.heroku+json; version=3" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment