Permalink
Browse files

Adds filter hook version in for release start

Also adds sample script.

Signed-off-by: Peter van der Does <peter@avirtualhome.com>
  • Loading branch information...
1 parent 22ccaed commit 104af0331971045836a662685be8030083ccbaac @petervanderdoes committed Jan 4, 2012
Showing with 18 additions and 0 deletions.
  1. +4 −0 git-flow-release
  2. +14 −0 hooks/filter-flow-release-start-version
View
@@ -153,6 +153,10 @@ cmd_start() {
DEFINE_boolean fetch false "fetch from $ORIGIN before performing finish" F
parse_args "$@"
BASE=${2:-$DEVELOP_BRANCH}
+ # Run filter on the version
+ VERSION=`run_filter_hook release-start-version $VERSION`
+ # As VERSION might have changed reset BRANCH with new VERSION
+ BRANCH=$PREFIX$VERSION
require_version_arg
require_base_is_on_develop
require_no_existing_release_branches
@@ -0,0 +1,14 @@
+#!/bin/sh
+#
+# Runs during git flow release start
+#
+# Positional arguments:
+# $1 Version
+#
+VERSION=$1
+
+# Implement your script here.
+
+# Return the VERSION
+echo ${VERSION}
+exit 0

0 comments on commit 104af03

Please sign in to comment.