Skip to content

Commit

Permalink
Make git-flow-version a first-class citizen amongst the other subcomm…
Browse files Browse the repository at this point in the history
…ands.
  • Loading branch information
nvie committed Jan 27, 2010
1 parent 170dc74 commit 3625f39
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 4 deletions.
7 changes: 6 additions & 1 deletion bump-version
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ if [ $# -ne 1 ]; then
exit 1
fi

echo "GITFLOW_VERSION=$1" > git-flow-version
if ! sed 's/^GITFLOW_VERSION=.*$/GITFLOW_VERSION='$1'/g' git-flow-version > .git-flow-version.new; then
echo "Could not replace GITFLOW_VERSION variable." >&2
exit 2
fi

mv .git-flow-version.new git-flow-version
git add git-flow-version
git commit -m "Bumped version number to $1" git-flow-version
4 changes: 1 addition & 3 deletions git-flow
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,6 @@ has() {
}

usage() {
. "$GITFLOW_DIR/git-flow-version"
echo "git-flow, version $GITFLOW_VERSION"
echo
echo "usage: git flow <subcommand>"
echo
echo "Available subcommands are:"
Expand All @@ -44,6 +41,7 @@ usage() {
echo " release Manage your release branches."
echo " hotfix Manage your hotfix branches."
echo " support Manage your support branches."
echo " version Shows version information."
echo
echo "Try 'git flow <subcommand> help' for details."
}
Expand Down
26 changes: 26 additions & 0 deletions git-flow-version
Original file line number Diff line number Diff line change
@@ -1 +1,27 @@
#
# git-flow -- A collection of Git extensions to provide high-level
# repository operations for Vincent Driessen's branching model.
#
# Original blog post presenting this model is found at:
# http://nvie.com/archives/323
#
# Feel free to contribute to this project at:
# http://github.com/nvie/gitflow
#
# Copyright (c) 2010 by Vincent Driessen
# Copyright (c) 2010 by Benedikt Böhm
#
GITFLOW_VERSION=0.2-dirty

usage() {
echo "usage: git flow version"
}

cmd_help() {
usage
exit 0
}

cmd_default() {
echo "$GITFLOW_VERSION"
}

0 comments on commit 3625f39

Please sign in to comment.