Skip to content

Commit 5b200ca

Browse files
committed
feat(hooks): add supporting hooks for create
Add template hook scripts for git flow release create.
1 parent c40d315 commit 5b200ca

6 files changed

+134
-0
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#!/bin/sh
2+
#
3+
# Runs during git flow release create finish
4+
#
5+
# Positional arguments:
6+
# $1 Version
7+
#
8+
# Return VERSION - When VERSION is returned empty, git-flow will stop as the
9+
# version is necessary
10+
#
11+
# The following variables are available as they are exported by git-flow:
12+
#
13+
# MASTER_BRANCH - The branch defined as Master
14+
# DEVELOP_BRANCH - The branch defined as Develop
15+
#
16+
VERSION=$1
17+
18+
# Implement your script here.
19+
20+
# Return the VERSION
21+
echo ${VERSION}
22+
exit 0
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#!/bin/sh
2+
#
3+
# Runs during git flow release create start
4+
#
5+
# Positional arguments:
6+
# $1 Version
7+
#
8+
# Return VERSION - When VERSION is returned empty, git-flow will stop as the
9+
# version is necessary
10+
#
11+
# The following variables are available as they are exported by git-flow:
12+
#
13+
# MASTER_BRANCH - The branch defined as Master
14+
# DEVELOP_BRANCH - The branch defined as Develop
15+
#
16+
VERSION=$1
17+
18+
# Implement your script here.
19+
20+
# Return the VERSION
21+
echo ${VERSION}
22+
exit 0

hooks/post-flow-create-finish

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#!/bin/sh
2+
#
3+
# Runs at the end of git flow release create finish
4+
#
5+
# Positional arguments:
6+
# $1 The version (including the version prefix)
7+
# $2 The origin remote
8+
# $3 The full branch name (including the release prefix)
9+
#
10+
# The following variables are available as they are exported by git-flow:
11+
#
12+
# MASTER_BRANCH - The branch defined as Master
13+
# DEVELOP_BRANCH - The branch defined as Develop
14+
#
15+
VERSION=$1
16+
ORIGIN=$2
17+
BRANCH=$3
18+
19+
# Implement your script here.
20+
21+
exit 0

hooks/post-flow-release-create

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#!/bin/sh
2+
#
3+
# Runs at the end of git flow release create start
4+
#
5+
# Positional arguments:
6+
# $1 The version (including the version prefix)
7+
# $2 The origin remote
8+
# $3 The full branch name (including the release prefix)
9+
# $4 The base from which this release is started
10+
#
11+
# The following variables are available as they are exported by git-flow:
12+
#
13+
# MASTER_BRANCH - The branch defined as Master
14+
# DEVELOP_BRANCH - The branch defined as Develop
15+
#
16+
VERSION=$1
17+
ORIGIN=$2
18+
BRANCH=$3
19+
BASE=$4
20+
21+
# Implement your script here.
22+
23+
exit 0

hooks/pre-flow-create-finish

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#!/bin/sh
2+
#
3+
# Runs before git flow release create finish
4+
#
5+
# Positional arguments:
6+
# $1 The version (including the version prefix)
7+
# $2 The origin remote
8+
# $3 The full branch name (including the release prefix)
9+
#
10+
# The following variables are available as they are exported by git-flow:
11+
#
12+
# MASTER_BRANCH - The branch defined as Master
13+
# DEVELOP_BRANCH - The branch defined as Develop
14+
#
15+
VERSION=$1
16+
ORIGIN=$2
17+
BRANCH=$3
18+
19+
# Implement your script here.
20+
21+
# To terminate the git-flow action, return a non-zero exit code.
22+
exit 0

hooks/pre-flow-release-create

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#!/bin/sh
2+
#
3+
# Runs before git flow release create start
4+
#
5+
# Positional arguments:
6+
# $1 The version (including the version prefix)
7+
# $2 The origin remote
8+
# $3 The full branch name (including the release prefix)
9+
# $4 The base from which this release is started
10+
#
11+
# The following variables are available as they are exported by git-flow:
12+
#
13+
# MASTER_BRANCH - The branch defined as Master
14+
# DEVELOP_BRANCH - The branch defined as Develop
15+
#
16+
VERSION=$1
17+
ORIGIN=$2
18+
BRANCH=$3
19+
BASE=$4
20+
21+
# Implement your script here.
22+
23+
# To terminate the git-flow action, return a non-zero exit code.
24+
exit 0

0 commit comments

Comments
 (0)