This is an automated email from the ASF dual-hosted git repository. dashorst pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/wicket.git
commit 6681cbd8fc60b6015ac422d6f6c2fb180a315243 Author: Martijn Dashorst <[email protected]> AuthorDate: Mon Oct 26 17:28:11 2026 +0100 Fix the release script failures found while releasing 9.25.0 build-versions.py gave every module the release and development version of Wicket itself. A module with a version line of its own, such as the experimental modules on 9.x and 8.x, is now released at that version without -SNAPSHOT and continues on the next one; a module that shares the project version keeps getting the versions from the command line. On master every module shares the project version, so the output is unchanged here. release.sh: - The staging repository id lost its orgapachewicket- prefix, so rc-close and the generated promote and revert scripts failed with "Missing staging repository". The full id is kept now, as on 10.x. - Maven 3.9 uploads in parallel, which can split a release over several staging repositories. Uploads are sequential now. - The tag signing passed the escaped quotes of its message to git as literal characters, failed with "too many arguments" and left the release tag unsigned. The quotes are plain now, and a failure stops the script. - gpg problems surfaced only in release:perform, after release:prepare had committed and tagged. The script now signs a test message before anything else, which also unlocks the key in the agent. - The default version was read before switching to master, so after a failed run it came from the build branch and suggested the next version. The script checks out master first. - The generated revert script lost the backslash of "-exec rm {} \;" and failed in find; it uses "-exec rm {} +" now. GitHub issue #1721 Generated-by: Claude Code (Claude Opus 5.5) --- build-versions.py | 22 +++++++++++++++++----- release.sh | 17 ++++++++++++----- 2 files changed, 29 insertions(+), 10 deletions(-) diff --git a/build-versions.py b/build-versions.py index d5a5e56df3..39dc91a7f0 100755 --- a/build-versions.py +++ b/build-versions.py @@ -9,7 +9,9 @@ # build-versions.py <release-version> <dev-version> # # This will generate a release.properties file that will release the -# release-version, and will continue development on dev-version. +# release-version, and will continue development on dev-version. A module +# with a version of its own, such as the experimental modules, is released +# at that version without -SNAPSHOT and continues on the next one. # # Example: # @@ -32,19 +34,29 @@ devVersion = sys.argv[2] relVersions = [] devVersions = [] -def addVersions(groupId, artifactId): - relVersions.append("project.rel." + groupId + "\\:" + artifactId + "=" + relVersion) - devVersions.append("project.dev." + groupId + "\\:" + artifactId + "=" + devVersion) +def ownVersions(version): + release = version[:-len("-SNAPSHOT")] if version.endswith("-SNAPSHOT") else version + parts = release.split(".") + parts[-1] = str(int(parts[-1]) + 1) + return release, ".".join(parts) + "-SNAPSHOT" + +def addVersions(groupId, artifactId, version): + rel, dev = (relVersion, devVersion) if version == projectVersion else ownVersions(version) + relVersions.append("project.rel." + groupId + "\\:" + artifactId + "=" + rel) + devVersions.append("project.dev." + groupId + "\\:" + artifactId + "=" + dev) def addModule(directory): pom = ET.parse(os.path.join(directory, "pom.xml")).getroot() groupId = pom.findtext("pom:groupId", namespaces=NS) or pom.findtext("pom:parent/pom:groupId", namespaces=NS) - addVersions(groupId, pom.findtext("pom:artifactId", namespaces=NS)) + version = pom.findtext("pom:version", namespaces=NS) or pom.findtext("pom:parent/pom:version", namespaces=NS) + addVersions(groupId, pom.findtext("pom:artifactId", namespaces=NS), version) for module in pom.iterfind(".//pom:modules/pom:module", NS): addModule(os.path.join(directory, module.text)) +projectVersion = ET.parse("pom.xml").getroot().findtext("pom:version", namespaces=NS) + addModule(".") for version in relVersions: diff --git a/release.sh b/release.sh index 028088faa7..e8f44b9143 100755 --- a/release.sh +++ b/release.sh @@ -126,7 +126,7 @@ svn rm https://dist.apache.org/repos/dist/dev/wicket/$version -m "Release vote h mvn org.sonatype.plugins:nexus-staging-maven-plugin:LATEST:rc-drop -DstagingRepositoryId=$stagingrepoid -DnexusUrl=https://repository.apache.org -DserverId=apache.releases.https -Ddescription="Release vote has failed" # clean up remaining release files -find . -name "*.releaseBackup" -exec rm {} \\; +find . -name "*.releaseBackup" -exec rm {} + [ -f release.properties ] && rm release.properties EOF @@ -324,6 +324,12 @@ Java used to compile (from toolchain) is: $(getJdkToolchain) agentcount=`ps aux|grep gpg-agent|wc -l` +echo "Checking that gpg can sign" +echo "test" | gpg --clearsign > /dev/null || fail "gpg is unable to sign, check gpg-agent and pinentry" + +# the version to release comes from $GIT_BRANCH, not from a build branch left by a failed run +git checkout $GIT_BRANCH || fail "Unable to check out $GIT_BRANCH" + current_version=$(getProjectVersionFromPom) major_version=$(expr $current_version : '\(.*\)\..*\..*\-.*') minor_version=$(expr $current_version : '.*\.\(.*\)\..*\-.*') @@ -484,19 +490,19 @@ mvn -q clean -Pall # package and assemble the release echo "Prepare the release" -mvn --batch-mode release:prepare -X -l $log -DpreparationGoals="clean" -Dtag=$tag -Papache-release,release +mvn --batch-mode release:prepare -X -l $log -DpreparationGoals="clean" -Dtag=$tag -Daether.connector.basic.parallelPut=false -Papache-release,release if [ $? -ne 0 ] ; then fail "ERROR: mvn release:prepare was not successful" fi echo "Performing the release using Maven" -mvn -Dgpg.passphrase="$passphrase" -ff -l $log release:perform -DlocalCheckout=true -Dtag=$tag -Papache-release,release +mvn -Dgpg.passphrase="$passphrase" -ff -l $log release:perform -DlocalCheckout=true -Dtag=$tag -Daether.connector.basic.parallelPut=false -Papache-release,release if [ $? -ne 0 ] ; then fail "ERROR: mvn release:perform was not successful" fi # Determine the staging repository and close it after deploying the release to the staging area -stagingrepoid=$(mvn org.sonatype.plugins:nexus-staging-maven-plugin:LATEST:rc-list -DnexusUrl=https://repository.apache.org -DserverId=apache.releases.https | grep -v "CLOSED" | grep -Eo "orgapachewicket-[0-9]+" | sed 's/orgapachewicket-//';) +stagingrepoid=$(mvn org.sonatype.plugins:nexus-staging-maven-plugin:LATEST:rc-list -DnexusUrl=https://repository.apache.org -DserverId=apache.releases.https | grep -v "CLOSED" | grep -Eo "orgapachewicket-[0-9]+") echo "Closing staging repository with id $stagingrepoid" mvn org.sonatype.plugins:nexus-staging-maven-plugin:LATEST:rc-close -DstagingRepositoryId=$stagingrepoid -DnexusUrl=https://repository.apache.org -DserverId=apache.releases.https -Ddescription="Release has been built, awaiting vote" @@ -621,7 +627,8 @@ git commit -m "Added post-release scripts and vote/release email templates" echo "Signing the release tag" git checkout $tag -git tag --sign --force --message \"Signed release tag for Apache Wicket $version\" $tag >> $log +git tag --sign --force --message "Signed release tag for Apache Wicket $version" $tag >> $log \ + || fail "Unable to sign the release tag $tag" git checkout $branch echo "Pushing build artifacts to the staging repository"
