square up build variables to RELEASE_BRANCH_PATTERN and PRERELEASE_BRANCH_PATTERn

This commit is contained in:
Jonathan Shook 2021-04-01 11:40:53 -05:00
parent 29b7cb55b1
commit 446bc417df
3 changed files with 9 additions and 9 deletions

View File

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

View File

@ -26,9 +26,9 @@ readonly local current_branch=$(git rev-parse --abbrev-ref HEAD)
echo "Current branch: ${branch}"
if [[ -n "${current_branch}" && "${current_branch}" == *"${RELEASE_BRANCH_PATTERN}"* ]]; then
echo "Building for release branch $RELEASE_BRANCH_NAME"
echo "Building for release branch ${current_branch}"
elif [[ -n "${current_branch}" && "${current_branch}" == *"${PRERELEASE_BRANCH_PATTERN}"* ]]; then
echo "Building prerelease for branch $RELEASE_BRANCH_NAME"
echo "Building prerelease for branch ${current_branch}"
else
echo "Skipping for ${current_branch} branch"
exit 0

View File

@ -15,10 +15,10 @@ readonly local current_branch=$(git rev-parse --abbrev-ref HEAD)
echo "Current branch: ${current_branch}"
if [[ -n "${current_branch}" && "${current_branch}" == *"${RELEASE_BRANCH_PATTERN}"* ]]; then
echo "Building for release branch $RELEASE_BRANCH_NAME"
echo "Building for release branch ${current_branch}"
elif [[ -n "${current_branch}" && "${current_branch}" == *"${PRERELEASE_BRANCH_PATTERN}"* ]]; then
echo "Building prerelease for branch $RELEASE_BRANCH_NAME"
else
echo "Building prerelease for branch ${current_branch}"
else
echo "Skipping for ${current_branch} branch"
exit 0
fi