Skip to content
Snippets Groups Projects
Commit 45114bcf authored by Tom Robinson's avatar Tom Robinson
Browse files

Simple script to deploy current branch to Heroku

parent 36c935ca
Branches
Tags
No related merge requests found
#!/bin/bash
set -euo pipefail
if [ $# -gt 0 ]; then
heroku_app_name="$1"
else
heroku_app_name="metabase-$(git rev-parse --abbrev-ref HEAD)"
fi
if ! heroku ps -a "$heroku_app_name" > /dev/null; then
heroku apps:create -n --addons "heroku-postgresql:hobby-dev" "$heroku_app_name"
heroku buildpacks:clear -a "$heroku_app_name"
heroku buildpacks:add "https://github.com/heroku/heroku-buildpack-nodejs" -a "$heroku_app_name"
heroku buildpacks:add "https://github.com/heroku/heroku-buildpack-clojure" -a "$heroku_app_name"
fi
time git push -f "https://git.heroku.com/$heroku_app_name.git" HEAD:master
heroku open -a "$heroku_app_name"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment