From 2255c33292b6f027ada4411ffdddc8220b0b51c2 Mon Sep 17 00:00:00 2001 From: Roman Bredehoft Date: Mon, 4 Sep 2023 11:58:40 +0200 Subject: [PATCH] chore: fix syntax error in release workflow --- .github/workflows/prepare_release.yaml | 12 ++++++------ .github/workflows/release.yaml | 11 ++++++----- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/.github/workflows/prepare_release.yaml b/.github/workflows/prepare_release.yaml index 8c28ea39b..4b86eb6dd 100644 --- a/.github/workflows/prepare_release.yaml +++ b/.github/workflows/prepare_release.yaml @@ -70,11 +70,11 @@ jobs: run: | IS_PATCH="$(poetry run python ./script/make_utils/version_utils.py is_patch_release --version "$VERSION")" - if [[ "${IS_PATCH}" == 'true']]; then + if [[ "${IS_PATCH}" == "false" ]]; then if [[ "${BRANCH_IS_RELEASE}" == "false" ]]; then echo "Patch release cannot be done: target branch is not a release branch" - echo "Got branch ${BRANCH_NAME}" + echo "Got branch '${BRANCH_NAME}'" exit 1 else @@ -85,15 +85,15 @@ jobs: if [[ "${EXPECTED_BRANCH_NAME}" != "${BRANCH_NAME}" ]]; then echo "Patch release cannot be done: target branch name does not match the current version" - echo "Got branch ${BRANCH_NAME} but for version ${VERSION}" - echo "Expected "${EXPECTED_BRANCH_NAME}" + echo "Got branch '${BRANCH_NAME}' for version '${VERSION}'" + echo "Expected branch '${EXPECTED_BRANCH_NAME}'" exit 1 fi fi - elif [[ "${IS_PATCH}" == 'false' && "${BRANCH_IS_MAIN}" == "false" ]]; then + elif [[ "${IS_PATCH}" == "false" && "${BRANCH_IS_MAIN}" == "false" ]]; then echo "Release cannot be done: target branch is not main" - echo "Got branch ${BRANCH_NAME}" + echo "Got branch '${BRANCH_NAME}'" exit 1 fi diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 24132e867..6250fe12a 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -181,22 +181,23 @@ jobs: # release version, the release preparation process is stopped as well - name: Check release preparation is from right branch run: | - if [[ "${{ env.IS_PATCH }}" == 'true']]; then + if [[ "${{ env.IS_PATCH }}" == "true" ]]; then if [[ "${BRANCH_IS_RELEASE}" == "false" ]]; then echo "Patch release cannot be done: target branch is not a release branch" - echo "Got branch ${BRANCH_NAME}" + echo "Got branch '${BRANCH_NAME}'" exit 1 elif [[ "${RELEASE_BRANCH_NAME}" != "${BRANCH_NAME}" ]]; then echo "Patch release cannot be done: target branch name does not match the current version" - echo "Got branch ${BRANCH_NAME} for version ${PROJECT_VERSION}" + echo "Got branch '${BRANCH_NAME}' for version '${PROJECT_VERSION}'" + echo "Expected branch '${RELEASE_BRANCH_NAME}'" exit 1 fi - elif [[ "${{ env.IS_PATCH }}" == 'false' && "${BRANCH_IS_MAIN}" == "false" ]]; then + elif [[ "${{ env.IS_PATCH }}" == "false" && "${BRANCH_IS_MAIN}" == "false" ]]; then echo "Release cannot be done: target branch is not main" - echo "Got branch ${BRANCH_NAME}" + echo "Got branch '${BRANCH_NAME}'" exit 1 fi