allow prereleases from main for nb4

This commit is contained in:
Jonathan Shook 2020-12-14 10:42:50 -06:00
parent 832da18548
commit bd97680ce8
3 changed files with 6 additions and 4 deletions

View File

@ -108,8 +108,8 @@ jobs:
- name: prepare Maven release - name: prepare Maven release
run: scripts/release-prepare.sh run: scripts/release-prepare.sh
env: env:
RELEASE_BRANCH_NAME: "main" RELEASE_BRANCH_PATTERN: "release"
PRERELEASE_BRANCH_PATTERN: "-rc" PRERELEASE_BRANCH_PATTERN: "main"
GIT_RELEASE_BOT_NAME: "nb-droid" GIT_RELEASE_BOT_NAME: "nb-droid"
GIT_RELEASE_BOT_EMAIL: ${{ secrets.GIT_RELEASE_BOT_EMAIL }} GIT_RELEASE_BOT_EMAIL: ${{ secrets.GIT_RELEASE_BOT_EMAIL }}
ACCESS_TOKEN: ${{ secrets.GITHUB_ACCESS_TOKEN }} ACCESS_TOKEN: ${{ secrets.GITHUB_ACCESS_TOKEN }}

View File

@ -22,8 +22,9 @@ fi
PRERELEASE_BRANCH_PATTERN=${PRERELEASE_BRANCH_PATTERN:?PRERELEASE_BRANCH_PATTERN must be provided} PRERELEASE_BRANCH_PATTERN=${PRERELEASE_BRANCH_PATTERN:?PRERELEASE_BRANCH_PATTERN must be provided}
# Filter the branch to execute the release on # Filter the branch to execute the release on
readonly local current_branch=$(git rev-parse --abbrev-ref HEAD) readonly local current_branch=$(git rev-parse --abbrev-ref HEAD)
echo "Current branch: ${branch}" echo "Current branch: ${branch}"
if [[ -n "$RELEASE_BRANCH_NAME" && "${current_branch}" = "$RELEASE_BRANCH_NAME" ]]; then if [[ -n "${current_branch}" && "${current_branch}" == *"${RELEASE_BRANCH_PATTERN}"* ]]; then
echo "Building for release branch $RELEASE_BRANCH_NAME" echo "Building for release branch $RELEASE_BRANCH_NAME"
elif [[ -n "${current_branch}" && "${current_branch}" == *"${PRERELEASE_BRANCH_PATTERN}"* ]]; then elif [[ -n "${current_branch}" && "${current_branch}" == *"${PRERELEASE_BRANCH_PATTERN}"* ]]; then
echo "Building prerelease for branch $RELEASE_BRANCH_NAME" echo "Building prerelease for branch $RELEASE_BRANCH_NAME"

View File

@ -13,7 +13,8 @@ PRERELEASE_BRANCH_PATTERN=${PRERELEASE_BRANCH_PATTERN:?PRERELEASE_BRANCH_PATTERN
# Filter the branch to execute the release on # Filter the branch to execute the release on
readonly local current_branch=$(git rev-parse --abbrev-ref HEAD) readonly local current_branch=$(git rev-parse --abbrev-ref HEAD)
echo "Current branch: ${current_branch}" echo "Current branch: ${current_branch}"
if [[ -n "$RELEASE_BRANCH_NAME" && "${current_branch}" = "$RELEASE_BRANCH_NAME" ]]; then
if [[ -n "${current_branch}" && "${current_branch}" == *"${RELEASE_BRANCH_PATTERN}"* ]]; then
echo "Building for release branch $RELEASE_BRANCH_NAME" echo "Building for release branch $RELEASE_BRANCH_NAME"
elif [[ -n "${current_branch}" && "${current_branch}" == *"${PRERELEASE_BRANCH_PATTERN}"* ]]; then elif [[ -n "${current_branch}" && "${current_branch}" == *"${PRERELEASE_BRANCH_PATTERN}"* ]]; then
echo "Building prerelease for branch $RELEASE_BRANCH_NAME" echo "Building prerelease for branch $RELEASE_BRANCH_NAME"