Skip to content

Commit

Permalink
feat(hooks): add supporting hooks for create
Browse files Browse the repository at this point in the history
Add template hook scripts for git flow release create.
  • Loading branch information
ChrisJStone committed Jul 1, 2023
1 parent c40d315 commit 5b200ca
Show file tree
Hide file tree
Showing 6 changed files with 134 additions and 0 deletions.
22 changes: 22 additions & 0 deletions hooks/filter-flow-create-finish-version
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/bin/sh
#
# Runs during git flow release create finish
#
# Positional arguments:
# $1 Version
#
# Return VERSION - When VERSION is returned empty, git-flow will stop as the
# version is necessary
#
# The following variables are available as they are exported by git-flow:
#
# MASTER_BRANCH - The branch defined as Master
# DEVELOP_BRANCH - The branch defined as Develop
#
VERSION=$1

# Implement your script here.

# Return the VERSION
echo ${VERSION}
exit 0
22 changes: 22 additions & 0 deletions hooks/filter-flow-create-start-version
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/bin/sh
#
# Runs during git flow release create start
#
# Positional arguments:
# $1 Version
#
# Return VERSION - When VERSION is returned empty, git-flow will stop as the
# version is necessary
#
# The following variables are available as they are exported by git-flow:
#
# MASTER_BRANCH - The branch defined as Master
# DEVELOP_BRANCH - The branch defined as Develop
#
VERSION=$1

# Implement your script here.

# Return the VERSION
echo ${VERSION}
exit 0
21 changes: 21 additions & 0 deletions hooks/post-flow-create-finish
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/sh
#
# Runs at the end of git flow release create finish
#
# Positional arguments:
# $1 The version (including the version prefix)
# $2 The origin remote
# $3 The full branch name (including the release prefix)
#
# The following variables are available as they are exported by git-flow:
#
# MASTER_BRANCH - The branch defined as Master
# DEVELOP_BRANCH - The branch defined as Develop
#
VERSION=$1
ORIGIN=$2
BRANCH=$3

# Implement your script here.

exit 0
23 changes: 23 additions & 0 deletions hooks/post-flow-release-create
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/sh
#
# Runs at the end of git flow release create start
#
# Positional arguments:
# $1 The version (including the version prefix)
# $2 The origin remote
# $3 The full branch name (including the release prefix)
# $4 The base from which this release is started
#
# The following variables are available as they are exported by git-flow:
#
# MASTER_BRANCH - The branch defined as Master
# DEVELOP_BRANCH - The branch defined as Develop
#
VERSION=$1
ORIGIN=$2
BRANCH=$3
BASE=$4

# Implement your script here.

exit 0
22 changes: 22 additions & 0 deletions hooks/pre-flow-create-finish
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/bin/sh
#
# Runs before git flow release create finish
#
# Positional arguments:
# $1 The version (including the version prefix)
# $2 The origin remote
# $3 The full branch name (including the release prefix)
#
# The following variables are available as they are exported by git-flow:
#
# MASTER_BRANCH - The branch defined as Master
# DEVELOP_BRANCH - The branch defined as Develop
#
VERSION=$1
ORIGIN=$2
BRANCH=$3

# Implement your script here.

# To terminate the git-flow action, return a non-zero exit code.
exit 0
24 changes: 24 additions & 0 deletions hooks/pre-flow-release-create
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/sh
#
# Runs before git flow release create start
#
# Positional arguments:
# $1 The version (including the version prefix)
# $2 The origin remote
# $3 The full branch name (including the release prefix)
# $4 The base from which this release is started
#
# The following variables are available as they are exported by git-flow:
#
# MASTER_BRANCH - The branch defined as Master
# DEVELOP_BRANCH - The branch defined as Develop
#
VERSION=$1
ORIGIN=$2
BRANCH=$3
BASE=$4

# Implement your script here.

# To terminate the git-flow action, return a non-zero exit code.
exit 0

0 comments on commit 5b200ca

Please sign in to comment.