File tree Expand file tree Collapse file tree 3 files changed +33
-4
lines changed
Expand file tree Collapse file tree 3 files changed +33
-4
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,11 @@ if [ $# -ne 1 ]; then
88 exit 1
99fi
1010
11- echo " GITFLOW_VERSION=$1 " > git-flow-version
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
1217git add git-flow-version
1318git commit -m " Bumped version number to $1 " git-flow-version
Original file line number Diff line number Diff line change @@ -33,9 +33,6 @@ has() {
3333}
3434
3535usage () {
36- . " $GITFLOW_DIR /git-flow-version"
37- echo " git-flow, version $GITFLOW_VERSION "
38- echo
3936 echo " usage: git flow <subcommand>"
4037 echo
4138 echo " Available subcommands are:"
@@ -44,6 +41,7 @@ usage() {
4441 echo " release Manage your release branches."
4542 echo " hotfix Manage your hotfix branches."
4643 echo " support Manage your support branches."
44+ echo " version Shows version information."
4745 echo
4846 echo " Try 'git flow <subcommand> help' for details."
4947}
Original file line number Diff line number Diff line change 1+ #
2+ # git-flow -- A collection of Git extensions to provide high-level
3+ # repository operations for Vincent Driessen's branching model.
4+ #
5+ # Original blog post presenting this model is found at:
6+ # http://nvie.com/archives/323
7+ #
8+ # Feel free to contribute to this project at:
9+ # http://github.com/nvie/gitflow
10+ #
11+ # Copyright (c) 2010 by Vincent Driessen
12+ # Copyright (c) 2010 by Benedikt Böhm
13+ #
114GITFLOW_VERSION=0.2-dirty
15+
16+ usage() {
17+ echo "usage: git flow version"
18+ }
19+
20+ cmd_help() {
21+ usage
22+ exit 0
23+ }
24+
25+ cmd_default() {
26+ echo "$GITFLOW_VERSION"
27+ }
You can’t perform that action at this time.
0 commit comments