snazy commented on code in PR #3295:
URL: https://github.com/apache/polaris/pull/3295#discussion_r2637080336
##########
releasey/libs/_version.sh:
##########
@@ -146,19 +146,23 @@ function find_next_patch_number {
# This function finds the next available patch number for a given
major.minor version.
# It returns 0 and sets the global variable patch to the next available
patch number.
# Patch numbers start from 0. It takes major and minor as input (e.g., "1",
"0").
+ #
+ # The patch number should only be incremented if there is a final release
tag (without -rc suffix)
+ # for the current highest patch. If only RC tags exist for the highest
patch, we should reuse
+ # that patch number (allowing for additional RCs like rc1, rc2, etc.).
local major="$1"
local minor="$2"
- # Get all existing tags for this major.minor version
- local tag_pattern="apache-polaris-${major}.${minor}.*-incubating-rc*"
- local existing_tags
- existing_tags=$(git tag -l "${tag_pattern}" | sort -V)
+ # Get all existing RC tags for this major.minor version
+ local rc_tag_pattern="apache-polaris-${major}.${minor}.*-incubating-rc*"
Review Comment:
```suggestion
local
rc_tag_pattern="apache-polaris-${major}\.${minor}.[0-9]+-incubating-rc[0-9]+"
```
##########
releasey/libs/_version.sh:
##########
Review Comment:
```suggestion
local tag_pattern="apache-polaris-${version_without_rc}-rc[0-9]+"
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]