forked from exAspArk/git-flow-hooks
-
Notifications
You must be signed in to change notification settings - Fork 0
/
post-flow-release-start
executable file
·33 lines (27 loc) · 879 Bytes
/
post-flow-release-start
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/usr/bin/env bash
# Runs before git flow release 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.
SCRIPT_PATH="$0"; while [ -h "$SCRIPT_PATH" ]; do SCRIPT_PATH=$(readlink "$SCRIPT_PATH"); done
. "$(dirname $SCRIPT_PATH)/modules/functions.sh"
# . "$HOOKS_DIR/modules/write-version.sh"
. "$HOOKS_DIR/modules/notify-slack.sh" release $VERSION started
if [ $? -ne 0 ]; then
exit 1
fi
# To terminate the git-flow action, return a non-zero exit code.
exit 0