From 8aa44db89752ad54cc10b4dce8a388903cb986d0 Mon Sep 17 00:00:00 2001 From: Chris Cuilla Date: Tue, 6 Feb 2018 14:18:48 -0700 Subject: [PATCH] Adding Heroku team name as required parameter for create-heroku-app --- scripts/create-heroku-app | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) mode change 100644 => 100755 scripts/create-heroku-app diff --git a/scripts/create-heroku-app b/scripts/create-heroku-app old mode 100644 new mode 100755 index 463fc06..21d3284 --- a/scripts/create-heroku-app +++ b/scripts/create-heroku-app @@ -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=$1 ENV=$2 +TEAM=$3 fail() { @@ -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" \ No newline at end of file +message "To make this your default Heroku environment: git config heroku.remote $ENV"