File tree 3 files changed +33
-4
lines changed
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
8
8
exit 1
9
9
fi
10
10
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
12
17
git add git-flow-version
13
18
git 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() {
33
33
}
34
34
35
35
usage () {
36
- . " $GITFLOW_DIR /git-flow-version"
37
- echo " git-flow, version $GITFLOW_VERSION "
38
- echo
39
36
echo " usage: git flow <subcommand>"
40
37
echo
41
38
echo " Available subcommands are:"
@@ -44,6 +41,7 @@ usage() {
44
41
echo " release Manage your release branches."
45
42
echo " hotfix Manage your hotfix branches."
46
43
echo " support Manage your support branches."
44
+ echo " version Shows version information."
47
45
echo
48
46
echo " Try 'git flow <subcommand> help' for details."
49
47
}
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
+ #
1
14
GITFLOW_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