Skip to content

Commit

Permalink
chore: fix syntax error in release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
RomanBredehoft committed Sep 4, 2023
1 parent 008469d commit 2255c33
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/prepare_release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
11 changes: 6 additions & 5 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2255c33

Please sign in to comment.