vagrant/scripts/website_push_www.sh

18 lines
501 B
Bash
Raw Normal View History

2013-09-03 20:49:27 +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-www || {
2015-07-10 22:34:23 +00:00
git remote add heroku-www git@heroku.com:vagrantup-www-2.git
}
2013-09-03 20:49:27 +00:00
# Push the subtree (force)
git push heroku-www `git subtree split --prefix website/www master`:master --force