You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudberry.apache.org by dj...@apache.org on 2026/10/13 04:04:34 UTC

(cloudberry-pxf) branch REL_2_STABLE updated: Release: check the pom.xml version against the release tag

This is an automated email from the ASF dual-hosted git repository.

tuhaihe pushed a commit to branch REL_2_STABLE
in repository https://gitbox.apache.org/repos/asf/cloudberry-pxf.git


The following commit(s) were added to refs/heads/REL_2_STABLE by this push:
     new ef11aa4b Release: check the pom.xml version against the release tag
ef11aa4b is described below

commit ef11aa4b6a0ccd0632650b3de76bc2795ad8d70c
Author: Dianjin Wang <wa...@gmail.com>
AuthorDate: Mon Oct 12 17:20:08 2026 +0800

    Release: check the pom.xml version against the release tag
    
    The release script derived the release version from the tag but never
    compared it with the <version> in pom.xml, which ships in the source
    tarball.  2.2.0-incubating-rc2 went out with pom.xml still at
    2.1.0-incubating.
    
    Read the project version with xmllint, which the script already
    requires, and stop unless it is <base version>-incubating.
    
    Assisted-by: Claude Code
---
 package/cloudberry-pxf-release.sh | 17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)

diff --git a/package/cloudberry-pxf-release.sh b/package/cloudberry-pxf-release.sh
index eddd6c94..286940ae 100755
--- a/package/cloudberry-pxf-release.sh
+++ b/package/cloudberry-pxf-release.sh
@@ -25,7 +25,7 @@
 # tarball assembly.
 #
 # Supported Features:
-#   - Validates version consistency between release tag and version file
+#   - Validates version consistency between release tag, version file and pom.xml
 #   - Supports both final releases and release candidates (e.g., 2.0.0-incubating, 2.0.0-incubating-rc1)
 #   - Optionally reuses existing annotated Git tags if they match the current HEAD
 #   - Verifies that Git submodules are initialized (if defined in .gitmodules)
@@ -399,6 +399,20 @@ if [[ "$VERSION_FILE" != "$BASE_VERSION" ]]; then
   exit 1
 fi
 
+# The Maven project version in pom.xml is used by the Apache RAT check and
+# ships in the source tarball, so it must match the release version.
+POM_VERSION=$(xmllint --xpath '//*[local-name()="project"]/*[local-name()="version"]/text()' pom.xml 2>/dev/null || true)
+if [[ -z "$POM_VERSION" ]]; then
+  echo "ERROR: Could not extract <version> from pom.xml"
+  exit 1
+fi
+
+if [[ "$POM_VERSION" != "${BASE_VERSION}-incubating" ]]; then
+  echo "ERROR: Version in pom.xml ($POM_VERSION) does not match ${BASE_VERSION}-incubating."
+  echo "For RC tags like '$TAG', pom.xml should contain '${BASE_VERSION}-incubating'."
+  exit 1
+fi
+
 
 # Ensure working tree is clean
 if ! git diff-index --quiet HEAD --; then
@@ -410,6 +424,7 @@ echo "Version consistency verified"
 printf "    %-14s: %s\n" "Release Tag"   "$TAG"
 printf "    %-14s: %s\n" "Base Version"  "$BASE_VERSION"
 printf "    %-14s: %s\n" "version file"  "$VERSION_FILE"
+printf "    %-14s: %s\n" "pom.xml"  "$POM_VERSION"
 confirm_next_step
 
 section "Checking the state of the Tag"


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cloudberry.apache.org
For additional commands, e-mail: commits-help@cloudberry.apache.org