updated scripts for release

This commit is contained in:
Jonathan Shook 2020-05-05 12:48:16 -05:00
parent 1a74499307
commit 72392e277f
2 changed files with 8 additions and 7 deletions

View File

@ -20,10 +20,10 @@ if [[ "${last_release_commit_hash}" = "${GITHUB_SHA}" ]]; then
fi
# Filter the branch to execute the release on
readonly local branch=${GITHUB_REF##*/}
readonly local current_branch=$(git rev-parse --abbrev-ref HEAD)
echo "Current branch: ${branch}"
if [[ -n "$RELEASE_BRANCH_NAME" && ! "${branch}" = "$RELEASE_BRANCH_NAME" ]]; then
echo "Skipping for ${branch} branch"
if [[ -n "$RELEASE_BRANCH_NAME" && ! "${current_branch}" = "$RELEASE_BRANCH_NAME" ]]; then
echo "Skipping for ${current_branch} branch"
exit 0
fi

View File

@ -6,12 +6,13 @@ GIT_RELEASE_BOT_NAME=${GIT_RELEASE_BOT_NAME:?GIT_RELEASE_BOT_NAME must be provid
GITHUB_SHA=${GITHUB_SHA:?GITHUB_SHA must be provided}
GITHUB_REF=${GITHUB_REF:?GITHUB_REF must be provided}
RELEASE_BRANCH_NAME=${RELEASE_BRANCH_NAME:?RELEASE_BRANCH_NAME must be provided}
#git rev-parse --abbrev-ref HEAD
# Filter the branch to execute the release on
readonly local branch=${GITHUB_REF##*/}
echo "Current branch: ${branch}"
if [[ -n "$RELEASE_BRANCH_NAME" && ! "${branch}" = "$RELEASE_BRANCH_NAME" ]]; then
echo "Skipping for ${branch} branch"
readonly local current_branch=$(git rev-parse --abbrev-ref HEAD)
echo "Current branch: ${current_branch}"
if [[ -n "$RELEASE_BRANCH_NAME" && ! "${current_branch}" = "$RELEASE_BRANCH_NAME" ]]; then
echo "Skipping for ${current_branch} branch"
exit 0
fi