Support multiple modules and make release preparation idempotent - #512
Open
ppkarwasz wants to merge 3 commits into
Open
Support multiple modules and make release preparation idempotent#512ppkarwasz wants to merge 3 commits into
ppkarwasz wants to merge 3 commits into
Conversation
Adapt `deploy-release-reusable` to repositories with multiple modules inheriting directly from `logging-parent` (e.g. Apache Flume, whose reactor root and `flume-parent` both do): * The `revision` and `project.build.outputTimestamp` properties are now updated in every git-tracked `pom.xml` defining them (excluding `src/**`), using `versions:set-property` instead of `help:evaluate` and a `sed` hack. Both updates share a single step and Bash function. Also make the release preparation commits idempotent: * The changelog is released first, so the `project.build.outputTimestamp` value covers all release preparation commits. Since the `pom.xml` still contains the old version at that point, `revision` is overridden on the command line. * The timestamp is taken from the author date of `HEAD` (preserved by squash commits and rebases) and the commit updating it is backdated to the same value, so re-runs produce no new commits. * All commits are published with a single `git push` at the end. Assisted-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01A4jy56QVeduMJcpkryJQpG
Export `GIT_AUTHOR_DATE` once, right after checkout: the author date of the checked out commit. All automatic commits (changelog, `revision`, `project.build.outputTimestamp`) and the timestamp property now share this value, so re-runs of the workflow regenerate commits with identical author dates. Assisted-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01A4jy56QVeduMJcpkryJQpG
The step no longer only configures the committer identity, it also exports `GIT_AUTHOR_DATE`. Assisted-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01A4jy56QVeduMJcpkryJQpG
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adapts
deploy-release-reusableto repositories with multiple modules inheriting directly fromlogging-parent(e.g. Apache Flume, whose reactor root andflume-parentboth do), and makes the release preparation idempotent.Multi-module support
revisionandproject.build.outputTimestampproperties are now updated in every git-trackedpom.xmlthat defines them (auto-discovered withgit grep, excludingsrc/**so test-resource POMs are never touched) — no new workflow input needed.versions:set-propertywith-f <pom>per module, replacing both thehelp:evaluatecheck (which only reports one value per invocation) and thesedhack for the timestamp. One commit per property covers all changed POMs.Idempotency
revisionis overridden on the command line (-Drevision).HEAD(%adinstead of%cd) — preserved by squash commits and rebases — and the commit updating it is backdated (GIT_AUTHOR_DATE) to the same value. Re-runs therefore recompute the identical timestamp and create no new commits.git pushat the end.