Repository navigation
Version all POMs in the release workflow and verify they stay in sync - #338
Merged
AndreasIgel merged 5 commits intoOct 11, 2026
Conversation
The release workflow bumped a hardcoded module list, so performance-test (only part of a profile) was left on 0.6.0-SNAPSHOT, which made Dependabot propose bumping it to the released 0.6.0 (java-helpers#336). - add .github/scripts/project-version.sh (set|verify) discovering all tracked POMs via git - use it for the release and next-snapshot bumps and stage all POMs - fail CI and the release when any POM drifts from the root version - align performance-test with 0.7.0-SNAPSHOT
- readable functions and explicit --set <version> / --verify / --help options - run the version check only for release/* PRs, not on every CI build nor in the release workflow
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
|
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.



Fixes the root cause behind #336.
Problem
maven-central-release.ymlbumped a hardcoded module list (-pl core,processor,example,example-custom-generator+ explicitgit add).performance-test(only part of theperformance-testprofile) was never bumped, so after #295 it stayed on0.6.0-SNAPSHOTwhile main is on0.7.0-SNAPSHOT. Since #329 Dependabot scans/performance-test, seessimple-builders-core:${project.version}=0.6.0-SNAPSHOTand proposes the released0.6.0(#336).Changes
.github/scripts/project-version.sh:--set <version>runsversions:seton every trackedpom.xml(discovered viagit ls-files), so new or profile-only modules are picked up automatically.-DupdateBuildOutputTimestampPolicy=neverleavesproject.build.outputTimestampto the existing dedicated release step.--verifyfails if any POM's version differs from the root POM's.--verifyin "Determine version"; uses--setfor both the release and the next-snapshot bump; stagespom.xml '*/pom.xml'instead of a fixed file list. Deploy/SBOM/timestamp steps keep their explicitcore,processorlist on purpose (that list controls what gets published).performance-test/pom.xml→0.7.0-SNAPSHOT;RELEASE.mdupdated.Once merged, Dependabot should close #336 on its own (0.6.0 is older than 0.7.0-SNAPSHOT).
Tested locally
--verifyon current main fails onperformance-test/pom.xml(0.6.0-SNAPSHOT vs 0.7.0-SNAPSHOT); passes after the fix.--set 0.7.0in a scratch copy changes exactly the<version>of all 6 POMs, andgit add -- pom.xml '*/pom.xml'stages all of them.shellcheckclean.Written by Devin