2014-04-14 21:18:54 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
# Get the parent directory of where this script is.
|
|
|
|
SOURCE="${BASH_SOURCE[0]}"
|
|
|
|
while [ -h "$SOURCE" ] ; do SOURCE="$(readlink "$SOURCE")"; done
|
|
|
|
DIR="$( cd -P "$( dirname "$SOURCE" )/.." && pwd )"
|
|
|
|
|
|
|
|
# Change into that directory
|
|
|
|
cd $DIR
|
|
|
|
|
2015-01-02 21:28:56 +00:00
|
|
|
# Add the git remote if it doesn't exist
|
|
|
|
git remote | grep heroku || {
|
|
|
|
git remote add heroku git@heroku.com:consul-www.git
|
|
|
|
}
|
|
|
|
|
2014-04-14 21:18:54 +00:00
|
|
|
# Push the subtree (force)
|
|
|
|
git push heroku `git subtree split --prefix website master`:master --force
|