Skip to content
This repository has been archived by the owner on Nov 5, 2024. It is now read-only.

Adding Heroku team name as required parameter for create-heroku-app #50

Merged
merged 1 commit into from
Apr 9, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions scripts/create-heroku-app
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
#!/bin/bash

# Creates a new Heroku app and adds it as a git remote.
# The environment name could be staging, production, etc
#
# Usage: create-heroku-app <app name> <environment name> <team>

APP=$1
ENV=$2
TEAM=$3


fail() {
Expand Down Expand Up @@ -29,15 +35,18 @@ if [ -z "$ENV" ] ; then
fail "Missing Heroku remote (environment name) parameter"
fi

heroku apps:create --buildpack https://github.com/okgrow/meteor-buildpack-horse.git -r $ENV $APP || fail
if [ -z "$TEAM" ] ; then
fail "Missing Heroku team name parameter"
fi

heroku apps:create --buildpack https://github.com/okgrow/meteor-buildpack-horse.git -r $ENV $APP --team $TEAM || fail
heroku_command addons:create mongolab
heroku_command config:add ROOT_URL="https://$APP.herokuapp.com"
heroku_command config:add ENV=$ENV
heroku_command labs:enable http-session-affinity
#heroku_command labs:enable log-runtime-metrics

heroku_command addons:create logentries:le_tryit
heroku_command addons:create mailgun:starter
heroku_command addons:create scheduler:standard

message "To make this your default Heroku environment: git config heroku.remote $ENV"
message "To make this your default Heroku environment: git config heroku.remote $ENV"