Skip to content

Commit 6090afa

Browse files
authored
INFRA-2911-Skip version bumping for hotfixes (#119)
1 parent 432e82a commit 6090afa

File tree

1 file changed

+16
-4
lines changed

1 file changed

+16
-4
lines changed

.github/scripts/create-platform-release-pr.sh

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -527,8 +527,12 @@ main() {
527527
create_changelog_pr "$PLATFORM" "$NEW_VERSION" "$PREVIOUS_VERSION_REF" "$release_branch_name" "$changelog_branch_name"
528528
fi
529529

530-
# Step 3: Create version bump PR for main branch
531-
create_version_bump_pr "$PLATFORM" "$NEW_VERSION" "$next_version" "$version_bump_branch_name" "$release_branch_name" "main"
530+
# Step 3: Create version bump PR for main branch (skip for hotfix releases)
531+
if [[ "${PREVIOUS_VERSION_REF,,}" == "null" ]]; then
532+
echo "Skipping version bump PR for hotfix release (previous-version-ref is 'null')."
533+
else
534+
create_version_bump_pr "$PLATFORM" "$NEW_VERSION" "$next_version" "$version_bump_branch_name" "$release_branch_name" "main"
535+
fi
532536

533537
# Final summary
534538
echo ""
@@ -539,9 +543,17 @@ main() {
539543
echo "1. Release PR: release: ${NEW_VERSION}"
540544
if [ "$TEST_ONLY" != "true" ]; then
541545
echo "2. Changelog PR: chore: ${changelog_branch_name}"
542-
echo "3. Version bump PR: Bump main version to ${next_version}"
546+
if [[ "${PREVIOUS_VERSION_REF,,}" == "null" ]]; then
547+
echo "(Hotfix) Skipped version bump PR"
548+
else
549+
echo "3. Version bump PR: Bump main version to ${next_version}"
550+
fi
543551
else
544-
echo "2. Version bump PR: Bump main version to ${next_version} (test mode - changelog skipped)"
552+
if [[ "${PREVIOUS_VERSION_REF,,}" == "null" ]]; then
553+
echo "(Hotfix) Skipped version bump PR (test mode - changelog skipped)"
554+
else
555+
echo "2. Version bump PR: Bump main version to ${next_version} (test mode - changelog skipped)"
556+
fi
545557
fi
546558
echo "========================================="
547559
}

0 commit comments

Comments
 (0)