This is an automated email from the ASF dual-hosted git repository.
jamesbognar pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/juneau.git
The following commit(s) were added to refs/heads/master by this push:
new 6e4bab4d54 Update release.py
6e4bab4d54 is described below
commit 6e4bab4d54d5b794ed553081019b49bb157390a6
Author: James Bognar <[email protected]>
AuthorDate: Tue Dec 30 13:46:22 2025 -0500
Update release.py
---
scripts/release.py | 21 ++++++++++++++++++++-
1 file changed, 20 insertions(+), 1 deletion(-)
diff --git a/scripts/release.py b/scripts/release.py
index 469d726236..41117ee332 100755
--- a/scripts/release.py
+++ b/scripts/release.py
@@ -733,7 +733,26 @@ class ReleaseScript:
# Check that the current POM version is a SNAPSHOT (required by
release:prepare)
pom_path = juneau_dir / 'pom.xml'
if pom_path.exists():
- current_version = self._get_version_from_pom(pom_path)
+ # Read version directly from POM (don't use current-release.py as
it strips SNAPSHOT)
+ try:
+ import xml.etree.ElementTree as ET
+ tree = ET.parse(pom_path)
+ root = tree.getroot()
+ # Handle namespace
+ ns_uri = root.tag.split('}')[0].strip('{') if '}' in root.tag
else ''
+ if ns_uri:
+ ns = {'maven': ns_uri}
+ version_elem = root.find('maven:version', ns)
+ else:
+ version_elem = root.find('version')
+
+ if version_elem is not None and version_elem.text:
+ current_version = version_elem.text.strip()
+ else:
+ self.fail("Could not find version element in pom.xml")
+ except Exception as e:
+ self.fail(f"Could not parse version from pom.xml: {e}")
+
if not current_version.endswith('-SNAPSHOT'):
self.fail(
f"Current version in POM is '{current_version}', but
release:prepare requires a SNAPSHOT version.\n"