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 c54b5f8e00e8c9ca6bbc42f57c0663ac0efbeb0e
Author: Martijn Dashorst <[email protected]>
AuthorDate: Sun Nov 1 13:36:32 2026 +0100

    Stop the generated revert and promote scripts at the first failing step
    
    revert-$version.sh starts by checking out the main branch. When the
    generated files on the build branch had local modifications, the
    checkout refused, deleting the build branch then failed because it was
    still checked out, and the script went on to delete the staging branch
    and tag, remove the dist staging area and drop the Nexus staging
    repository, leaving the local branch and tag behind.
    promote-$version.sh has the same structure: a failed tag push or svn mv
    did not keep it from releasing the Nexus staging repository and
    renumbering the development version.
    
    Both scripts now run with set -e and stop at the first command that
    fails. A rerun after fixing the cause repeats the steps that already
    succeeded, and some of those fail the second time (a deleted branch
    can't be deleted again), so the remaining steps of such a run are
    finished by hand from the listed actions.
    
    The last step of the revert script, "[ -f release.properties ] && rm
    release.properties", left the script with exit status 1 when the file
    did not exist; it is "rm -f release.properties" now.
    
    The confirmation prompt lists the script's actions with tail, which
    depends on the number of header lines. The revert script's offset moves
    from 14 to 15 for the added line. The promote script keeps 14: its
    listing used to start at the blank line after the first comment, and
    with the added line it now starts at that comment.
    
    GitHub issue #1749
    
    Generated-by: Claude Code (Claude Opus 5.5)
---
 release.sh | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/release.sh b/release.sh
index 58183576df..d7f52a3f2e 100755
--- a/release.sh
+++ b/release.sh
@@ -48,6 +48,7 @@ function generate_promotion_script {
     echo "Generating release promotion script 'promote-$version.sh'"
 read -d '' script <<- EOF
 #!/bin/bash
+set -e
 echo "Promoting release $version
 
 Actions about to be performed:
@@ -98,12 +99,13 @@ function generate_rollback_script {
        echo "Generating release rollback script 'revert-$version.sh'"
 read -d '' script <<- EOF
 #!/bin/bash
+set -e
 echo -n "Reverting release $version
 
 Actions about to be performed:
 ------------------------------
 
-\$(cat \$0 | tail -n +14)
+\$(cat \$0 | tail -n +15)
 
 ------------------------------------------
 Press enter to continue or CTRL-C to abort"
@@ -127,7 +129,7 @@ mvn 
org.sonatype.plugins:nexus-staging-maven-plugin:LATEST:rc-drop -DstagingRepo
 
 # clean up remaining release files
 find . -name "*.releaseBackup" -exec rm {} +
-[ -f release.properties ] && rm release.properties
+rm -f release.properties
 
 EOF
 echo "$script" > revert-$version.sh

Reply via email to