git workflow tools

This commit is contained in:
Haak Saxberg 2014-06-26 00:12:52 -07:00
parent 0eb01fd8ba
commit 99a1b2bb39
6 changed files with 150 additions and 3 deletions

35
bin/cf_prepare_for_push Executable file
View file

@ -0,0 +1,35 @@
#!/bin/bash
set -e
usage() {
echo "$0 <deploy-branch-name>"
exit 1
}
main() {
if [ -z "$TESTING" ]; then
CHANNEL="platform"
else
CHANNEL="haaktest"
fi
USERNAME=$USER
DEPLOY_BRANCH="$1"
if [ -z $DEPLOY_BRANCH ]; then
usage
fi
nodebot $CHANNEL "push starting; ping $USERNAME with branch name if you want in."
setup_deploy_branch "$DEPLOY_BRANCH"
}
setup_deploy_branch() {
DEPLOY_BRANCH_NAME=$1
git fetch origin
git checkout -b $DEPLOY_BRANCH_NAME origin/master
}
main $@