Also add basic skeleton implementation for the gitflow-feature and gitflow-release subcommands.
This commit is contained in:
parent
61ade55fcb
commit
f7f687ce52
3 changed files with 80 additions and 0 deletions
33
gitflow-feature
Executable file
33
gitflow-feature
Executable file
|
@ -0,0 +1,33 @@
|
|||
#!/bin/sh
|
||||
|
||||
usage() {
|
||||
echo "usage: gitflow start feature <name> [<base>]"
|
||||
echo " gitflow finish feature <name>"
|
||||
}
|
||||
|
||||
parse_args() {
|
||||
# TODO: Implement the optional base argument
|
||||
FEATURE="$1"
|
||||
BASE="develop"
|
||||
if [ "$FEATURE" = "" ]; then
|
||||
echo "Missing argument <release>."
|
||||
usage
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
start() {
|
||||
# TODO
|
||||
parse_args "$@"
|
||||
gitflow_check_clean_working_tree
|
||||
echo "git checkout -b $FEATURE $BASE"
|
||||
}
|
||||
|
||||
finish() {
|
||||
# TODO
|
||||
parse_args "$@"
|
||||
gitflow_check_clean_working_tree
|
||||
echo "git checkout $BASE"
|
||||
echo "git merge --no-ff $FEATURE"
|
||||
}
|
||||
|
|
@ -5,8 +5,18 @@ usage() {
|
|||
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"
|
||||
|
@ -15,6 +25,7 @@ start() {
|
|||
|
||||
finish() {
|
||||
# TODO
|
||||
parse_args "$@"
|
||||
gitflow_check_clean_working_tree
|
||||
echo "git checkout master"
|
||||
echo "git merge --no-ff hotfix-$RELEASE"
|
||||
|
|
36
gitflow-release
Executable file
36
gitflow-release
Executable file
|
@ -0,0 +1,36 @@
|
|||
#!/bin/sh
|
||||
|
||||
usage() {
|
||||
echo "usage: gitflow start release <release>"
|
||||
echo " gitflow finish release <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 release-$RELEASE develop"
|
||||
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 release-$RELEASE"
|
||||
echo "git checkout develop"
|
||||
echo "git merge --no-ff release-$RELEASE"
|
||||
echo "git branch -d release-$RELEASE"
|
||||
}
|
||||
|
Loading…
Reference in a new issue