Use bash for heroku-regen

This commit is contained in:
Ben Busby 2021-03-17 12:44:30 -04:00 committed by Ben Busby
parent b87619a133
commit 5884001f05

View File

@ -1,4 +1,4 @@
#!/bin/sh #!/bin/bash
# Assumes this is being executed from a session that has already logged # Assumes this is being executed from a session that has already logged
# into Heroku with "heroku login -i" beforehand. # into Heroku with "heroku login -i" beforehand.
# #
@ -8,22 +8,22 @@
HEROKU_CLI_SITE="https://devcenter.heroku.com/articles/heroku-cli" HEROKU_CLI_SITE="https://devcenter.heroku.com/articles/heroku-cli"
if ! type "heroku" > /dev/null; then if ! [[ -x "$(command -v heroku)" ]]; then
echo "Must have heroku cli installed: $HEROKU_CLI_SITE" echo "Must have heroku cli installed: $HEROKU_CLI_SITE"
exit 1 exit 1
fi fi
cd "$(builtin cd "$(dirname "${BASH_SOURCE[0]}")" && pwd -P)/../" cd "$(builtin cd "$(dirname "${BASH_SOURCE[0]}")" && pwd -P)/../"
if [ $# -ne 1 ]; then if [[ $# -ne 1 ]]; then
echo "Must provide the name of the Whoogle instance to regenerate" echo -e "Must provide the name of the Whoogle instance to regenerate"
exit 1 exit 1
fi fi
APP_NAME="$1" APP_NAME="$1"
heroku apps:destroy $APP_NAME --confirm $APP_NAME heroku apps:destroy "$APP_NAME" --confirm "$APP_NAME"
heroku apps:create $APP_NAME heroku apps:create "$APP_NAME"
heroku container:login heroku container:login
heroku container:push web heroku container:push web
heroku container:release web heroku container:release web