git workflow tools
This commit is contained in:
parent
0eb01fd8ba
commit
99a1b2bb39
6 changed files with 150 additions and 3 deletions
35
bin/cf_prepare_for_push
Executable file
35
bin/cf_prepare_for_push
Executable 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 $@
|
||||
Loading…
Add table
Add a link
Reference in a new issue