48 lines
1,012 B
Bash
Executable file
48 lines
1,012 B
Bash
Executable file
#!/bin/sh
|
|
#
|
|
# gitflow -- A collection of Git wrapper scripts to provide high-level
|
|
# repository operations for Vincent Driessen's branching model:
|
|
#
|
|
# Original blog post presenting this model is found at:
|
|
# http://nvie.com/archives/323
|
|
#
|
|
# Feel free to contribute to this project at:
|
|
# http://github.com/nvie/gitflow
|
|
#
|
|
# Copyright (c) 2010 by Vincent Driessen
|
|
#
|
|
|
|
usage() {
|
|
echo "usage: gitflow start hotfix <release>"
|
|
echo " gitflow finish hotfix <release>"
|
|
}
|
|
|
|
parse_args() {
|
|
RELEASE="$1"
|
|
if [ "$RELEASE" = "" ]; then
|
|
echo "Missing argument <release>."
|
|
usage
|
|
exit 1
|
|
fi
|
|
}
|
|
|
|
start() {
|
|
# TODO
|
|
parse_args "$@"
|
|
gitflow_check_clean_working_tree
|
|
echo "git checkout -b hotfix-$RELEASE master"
|
|
echo "Bump version number"
|
|
echo "Fix bug"
|
|
}
|
|
|
|
finish() {
|
|
# TODO
|
|
parse_args "$@"
|
|
gitflow_check_clean_working_tree
|
|
echo "git checkout master"
|
|
echo "git merge --no-ff hotfix-$RELEASE"
|
|
echo "git checkout develop"
|
|
echo "git merge --no-ff hotfix-$RELEASE"
|
|
echo "git branch -d hotfix-$RELEASE"
|
|
}
|
|
|