Vincent Driessen | 61ade55 | 2010-01-21 01:28:08 +0100 | [diff] [blame] | 1 | #!/bin/sh |
Vincent Driessen | 093a147 | 2010-01-21 01:36:44 +0100 | [diff] [blame^] | 2 | # |
| 3 | # gitflow -- A collection of Git wrapper scripts to provide high-level |
| 4 | # repository operations for Vincent Driessen's branching model: |
| 5 | # |
| 6 | # Original blog post presenting this model is found at: |
| 7 | # http://nvie.com/archives/323 |
| 8 | # |
| 9 | # Feel free to contribute to this project at: |
| 10 | # http://github.com/nvie/gitflow |
| 11 | # |
| 12 | # Copyright (c) 2010 by Vincent Driessen |
| 13 | # |
Vincent Driessen | 61ade55 | 2010-01-21 01:28:08 +0100 | [diff] [blame] | 14 | |
| 15 | usage() { |
| 16 | echo "usage: gitflow start hotfix <release>" |
| 17 | echo " gitflow finish hotfix <release>" |
| 18 | } |
| 19 | |
Vincent Driessen | f7f687c | 2010-01-21 01:32:18 +0100 | [diff] [blame] | 20 | parse_args() { |
| 21 | RELEASE="$1" |
| 22 | if [ "$RELEASE" = "" ]; then |
| 23 | echo "Missing argument <release>." |
| 24 | usage |
| 25 | exit 1 |
| 26 | fi |
| 27 | } |
| 28 | |
Vincent Driessen | 61ade55 | 2010-01-21 01:28:08 +0100 | [diff] [blame] | 29 | start() { |
| 30 | # TODO |
Vincent Driessen | f7f687c | 2010-01-21 01:32:18 +0100 | [diff] [blame] | 31 | parse_args "$@" |
Vincent Driessen | 61ade55 | 2010-01-21 01:28:08 +0100 | [diff] [blame] | 32 | gitflow_check_clean_working_tree |
| 33 | echo "git checkout -b hotfix-$RELEASE master" |
| 34 | echo "Bump version number" |
| 35 | echo "Fix bug" |
| 36 | } |
| 37 | |
| 38 | finish() { |
| 39 | # TODO |
Vincent Driessen | f7f687c | 2010-01-21 01:32:18 +0100 | [diff] [blame] | 40 | parse_args "$@" |
Vincent Driessen | 61ade55 | 2010-01-21 01:28:08 +0100 | [diff] [blame] | 41 | gitflow_check_clean_working_tree |
| 42 | echo "git checkout master" |
| 43 | echo "git merge --no-ff hotfix-$RELEASE" |
| 44 | echo "git checkout develop" |
| 45 | echo "git merge --no-ff hotfix-$RELEASE" |
| 46 | echo "git branch -d hotfix-$RELEASE" |
| 47 | } |
| 48 | |