Copilot commented on code in PR #50813:
URL: https://github.com/apache/arrow/pull/50813#discussion_r3720978707
##########
dev/release/03-binary-submit.sh:
##########
@@ -34,7 +34,15 @@ version_with_rc="${version}-rc${rc}"
crossbow_job_prefix="release-${version_with_rc}"
release_tag="apache-arrow-${version}-rc${rc}"
rc_branch="release-${version_with_rc}"
-maint_branch="maint-${version}"
+
+patch_version=$(echo ${version} | cut -d. -f3)
+if [ "${patch_version}" -eq 0 ]; then
+ maint_branch="maint-${version}"
+else
+ # Patch releases use the maint-Major.Minor.x branch.
+ major_minor_version=$(echo ${version} | cut -d. -f1-2)
+ maint_branch="maint-${major_minor_version}.x"
+fi
Review Comment:
Same as in `02-source.sh`: the script treats any Z==0 release as
`maint-<version>`, but `archery release cherry-pick` uses `maint-<major>.x.x`
for minor releases (e.g. 1.1.0). If this script is used for a minor release,
`archery crossbow report-pr --base-branch` will target the wrong/non-existent
maintenance branch. Align the naming logic with
`dev/archery/archery/release/core.py`’s Major/Minor/Patch branch rules.
##########
dev/release/02-source.sh:
##########
@@ -40,7 +40,16 @@ rc=$2
. "${SOURCE_DIR}/utils-env.sh"
tag=apache-arrow-${version}-rc${rc}
-maint_branch=maint-${version}
+
+patch_version=$(echo ${version} | cut -d. -f3)
+if [ "${patch_version}" -eq 0 ]; then
+ maint_branch="maint-${version}"
+else
+ # Patch releases use the maint-Major.Minor.x branch.
+ major_minor_version=$(echo ${version} | cut -d. -f1-2)
+ maint_branch="maint-${major_minor_version}.x"
+fi
Review Comment:
The maintenance branch logic only distinguishes patch (Z!=0) vs non-patch
(Z==0). For a minor release like 1.1.0, `archery release cherry-pick` creates
`maint-<major>.x.x` (not `maint-<version>`), so `--base-branch=${maint_branch}`
would point at a non-existent branch and fail similarly to GH-50811. Consider
aligning this script’s branch naming with `dev/archery/archery/release/core.py`
(MajorRelease: maint-X.Y.Z, MinorRelease: maint-X.x.x, PatchRelease:
maint-X.Y.x).
--
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]