mirror of
https://github.com/nosqlbench/nosqlbench.git
synced 2024-12-28 01:31:05 -06:00
backport auto pre-releases on -rc branches
This commit is contained in:
parent
d089ff2450
commit
2bfe24eb9b
@ -19,10 +19,15 @@ if [[ "${last_release_commit_hash}" = "${GITHUB_SHA}" ]]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
PRERELEASE_BRANCH_PATTERN=${PRERELEASE_BRANCH_PATTERN:?PRERELEASE_BRANCH_PATTERN must be provided}
|
||||
# Filter the branch to execute the release on
|
||||
readonly local current_branch=$(git rev-parse --abbrev-ref HEAD)
|
||||
echo "Current branch: ${branch}"
|
||||
if [[ -n "$RELEASE_BRANCH_NAME" && ! "${current_branch}" = "$RELEASE_BRANCH_NAME" ]]; then
|
||||
if [[ -n "$RELEASE_BRANCH_NAME" && "${current_branch}" = "$RELEASE_BRANCH_NAME" ]]; then
|
||||
echo "Building for release branch $RELEASE_BRANCH_NAME"
|
||||
elif [[ -n "${current_branch}" && "${current_branch}" == *"${PRERELEASE_BRANCH_PATTERN}"* ]]; then
|
||||
echo "Building prerelease for branch $RELEASE_BRANCH_NAME"
|
||||
else
|
||||
echo "Skipping for ${current_branch} branch"
|
||||
exit 0
|
||||
fi
|
||||
|
@ -6,12 +6,18 @@ 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}
|
||||
PRERELEASE_BRANCH_PATTERN=${PRERELEASE_BRANCH_PATTERN:?PRERELEASE_BRANCH_PATTERN must be provided}
|
||||
|
||||
#git rev-parse --abbrev-ref HEAD
|
||||
|
||||
# Filter the branch to execute the release on
|
||||
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
|
||||
if [[ -n "$RELEASE_BRANCH_NAME" && "${current_branch}" = "$RELEASE_BRANCH_NAME" ]]; then
|
||||
echo "Building for release branch $RELEASE_BRANCH_NAME"
|
||||
elif [[ -n "${current_branch}" && "${current_branch}" == *"${PRERELEASE_BRANCH_PATTERN}"* ]]; then
|
||||
echo "Building prerelease for branch $RELEASE_BRANCH_NAME"
|
||||
else
|
||||
echo "Skipping for ${current_branch} branch"
|
||||
exit 0
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user