Vincent Driessen | f7f687c | 2010-01-21 01:32:18 +0100 | [diff] [blame^] | 1 | #!/bin/sh |
| 2 | |
| 3 | usage() { |
| 4 | echo "usage: gitflow start feature <name> [<base>]" |
| 5 | echo " gitflow finish feature <name>" |
| 6 | } |
| 7 | |
| 8 | parse_args() { |
| 9 | # TODO: Implement the optional base argument |
| 10 | FEATURE="$1" |
| 11 | BASE="develop" |
| 12 | if [ "$FEATURE" = "" ]; then |
| 13 | echo "Missing argument <release>." |
| 14 | usage |
| 15 | exit 1 |
| 16 | fi |
| 17 | } |
| 18 | |
| 19 | start() { |
| 20 | # TODO |
| 21 | parse_args "$@" |
| 22 | gitflow_check_clean_working_tree |
| 23 | echo "git checkout -b $FEATURE $BASE" |
| 24 | } |
| 25 | |
| 26 | finish() { |
| 27 | # TODO |
| 28 | parse_args "$@" |
| 29 | gitflow_check_clean_working_tree |
| 30 | echo "git checkout $BASE" |
| 31 | echo "git merge --no-ff $FEATURE" |
| 32 | } |
| 33 | |