dashorst opened a new issue, #1720: URL: https://github.com/apache/wicket/issues/1720
`release.sh` pushes the build branch `build/wicket-$version` and the signed release tag `rel/wicket-$version` to a remote called `staging`, which the script's own instructions describe as a fork on the release manager's GitHub account. `revert-$version.sh` undoes a failed vote by deleting both from that remote, and `promote-$version.sh` pushes the tag to `origin` once the vote has passed. The ASF git repositories protect `refs/tags/rel/*`: once pushed, such a tag can't be deleted or moved. With `staging` pointing at apache/wicket, the script pushes the release tag before the vote, and a withdrawn release candidate can't be reverted: the tag stays, and that version number can't be released anymore. This happened to 9.25.0. Its release candidate was staged in apache/wicket and withdrawn, and `rel/wicket-9.25.0` remains. Staging in a personal fork avoids that, but it puts the release candidate in a repository the project doesn't own, and every release manager needs a fork set up for it. ## Expected - The release candidate is staged in apache/wicket under refs that can be removed again: the `build/wicket-$version` branch and a release candidate tag outside `rel/`, for example `rc/wicket-$version-rc1`. - `refs/tags/rel/*` reaches apache/wicket only through `promote-$version.sh`, after a passing vote. - `revert-$version.sh` removes the branch and the release candidate tag, so a failed vote leaves nothing behind and the same version can be rolled again. ## Approach Keep the tag that `release:prepare` creates locally as `rel/wicket-$version`. The release plugin also writes that name into `<scm><tag>` of the released poms, and the poms on Maven Central should point at the final tag, not at one that is deleted after the vote. Only the name under which the tag is pushed during the vote changes: ```bash # release.sh git push origin $branch:refs/heads/$branch git push origin refs/tags/$tag:refs/tags/$rc_tag # revert-$version.sh git push origin --delete refs/heads/$branch refs/tags/$rc_tag # promote-$version.sh git push origin $tag git push origin --delete refs/tags/$rc_tag refs/heads/$branch ``` Further changes in `release.sh`: - drop the check that requires a `staging` remote; - the clean-up at the start removes only `$rc_tag` and `$branch`, never `$tag`; - `release-vote.txt` names apache/wicket and `$rc_tag` instead of the staging remote; - number the release candidate tag, so a re-roll can't be confused with the attempt voters already fetched. Before relying on it, confirm that apache/wicket allows deleting a tag outside `rel/`. ## Staging repository id The Nexus goals `rc-close`, `rc-drop` and `rc-release` need the full staging repository id, `orgapachewicket-NNNN`. The same part of `release.sh` gets that wrong on three lines: - `master` and `wicket-9.x` strip the prefix (`sed 's/orgapachewicket-//'`), so `rc-close` and the generated promote and revert scripts fail with `Missing staging repository`. `wicket-10.x` fixed this in 1fe5c5c3b5. - `wicket-8.x` selects with `grep -v "OPEN"` and `grep -Eo "(orgapachewicket-\d+)"`. `grep -E` doesn't support `\d`, so the id comes out empty. - Every line takes the first `orgapachewicket-*` repository in the `rc-list` output that isn't CLOSED, which isn't necessarily the one the release just deployed to. ## Branches The change is needed on every line that still releases. - [x] `master` (11.x) - [x] `wicket-10.x` - [x] `wicket-9.x` - [x] `wicket-8.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]
