open-nomad/scripts/website_push.sh

18 lines
477 B
Bash
Raw Normal View History

2015-06-01 11:46:21 +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
# Add the git remote if it doesn't exist
git remote | grep heroku || {
git remote add heroku git@heroku.com:nomad-www.git
}
# Push the subtree (force)
git push heroku `git subtree split --prefix website master`:master --force