Vincent Driessen | 5cdfc2f | 2010-01-26 11:55:03 +0100 | [diff] [blame] | 1 | #!/bin/sh |
| 2 | usage() { |
| 3 | echo "usage: bump-version <version-id>" |
| 4 | } |
| 5 | |
| 6 | if [ $# -ne 1 ]; then |
| 7 | usage |
| 8 | exit 1 |
| 9 | fi |
| 10 | |
Vincent Driessen | 3625f39 | 2010-01-28 00:13:26 +0100 | [diff] [blame] | 11 | if ! sed 's/^GITFLOW_VERSION=.*$/GITFLOW_VERSION='$1'/g' git-flow-version > .git-flow-version.new; then |
| 12 | echo "Could not replace GITFLOW_VERSION variable." >&2 |
| 13 | exit 2 |
| 14 | fi |
| 15 | |
| 16 | mv .git-flow-version.new git-flow-version |
Vincent Driessen | 059e689 | 2010-01-26 15:58:08 +0100 | [diff] [blame] | 17 | git add git-flow-version |
| 18 | git commit -m "Bumped version number to $1" git-flow-version |