Repository navigation
FELIX-6872 - Dependency Manager: release only the bundles that changed - #600
Conversation
The bundles are versioned separately, and the earlier releases only contained the bundles that changed. With the Maven build the release plugin releases the whole reactor. - mvn -N exec:exec@release-plan finds the bundles that changed since the tag of their latest release, and proposes the versions and the release:prepare command: the bundles that did not change are put back to the version they were released with. - While performing a release (the apache-release profile) a bundle whose version was released before, on another commit than the one being released, is not deployed (nor tagged) again. A tag on the release commit is from an earlier attempt of the same perform and does not count, so a perform can be retried. Snapshot versions are never tagged. The bundle tagging now uses the antrun plugin, as that needs to be able to skip a bundle. - Add README.release, which describes how to release with Maven. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
422f0dc to
8844251
Compare
…xec@release-plan The release program no longer only proposes the versions and the commands: it checks that the checkout is ready, proposes the versions, and runs release:prepare and release:perform with them, each after it asked for a confirmation and with the console of the user, for example for the gpg passphrase. -Dplan.only=true keeps the old behavior of only printing the plan. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…am without Maven Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
@pderop i made a few changes so we can release bundles (with maven) separatley without releasing all (untouched) subprojects. |
|
I was analysing all this, great work Paul I have other pending fixes to add, now I see you have started a new release, but no problem, we can do another release later. |
Yeah, sorry, that one could have been part of the release. But given how easy it is now, we can do another one soon. |
|
sure, no worries at all, what you have done is great, it will be be easier to release now. |
|
That part is pretty easy, see example i prepared for this release: apache/felix-antora-site#32 and apache/felix-antora-site#28 earlier. |
The Dependency Manager bundles are versioned separately, and the earlier releases only contained the bundles that changed. With the Maven build the release plugin releases the whole reactor, so a fix in one bundle (FELIX-6874 and FELIX-6880 only touch
org.apache.felix.dependencymanager) would republish four unchanged bundles.mvn -N exec:exec@release-plan(dependencymanager/release/ReleasePlan.java, plain Java 11) guides the release in a terminal: it checks that the working tree is clean and not behind origin and fetches the tags, finds the bundles that changed since the git tag of their latest release, proposes the versions and asks to confirm them (Enter accepts), warns whenchangelog.txtdoes not list the released bundles, and then runsrelease:prepareandrelease:performwith those versions, each after a confirmation, with the console of the user (gpg passphrase). The bundles that did not change are put back to the version they were released with. Changes to a bundle's tests and docs are ignored, and so are the version changes of its pom; other pom changes are reported with the bundle. Nothing that is not answered is done, so it stops when there is no terminal.-Dplan.only=trueonly prints the plan and the commands, and changes nothing.apache-releaseprofile, whichrelease:performactivates), a bundle whose<artifactId>-<version>tag exists on origin on another commit than the one being released is neither deployed nor tagged. That is how the unchanged bundles are left out. A tag on the release commit is from an earlier attempt of the same perform and does not count, so a failed perform can be retried. A failinggit ls-remotefails the build instead of deploying. Snapshot versions are never tagged. The bundle tagging from FELIX-6872 - Dependency Manager: tag every released bundle #593 moved fromexec-maven-pluginto the antrun plugin, because the tagging has to be skipped for those bundles.README.releasedescribes how to release with Maven; the Gradle one was removed with the Gradle build.Plain
mvn release:prepareandmvn release:performstill work, the plan only proposes the versions.Tested end to end in a scratch git repo with a local bare remote (scm URLs rewritten to it), with maven-release-plugin 3.0.1: the plan reports only the changed bundle as changed; a real
release:preparewith the proposed-Dproject.rel/devoptions (full verify, including the bundle baseline check, with the unchanged bundles at their released versions) and thenrelease:performwith no extra flags deploy only the parent pom and the changed bundle, skip the four others, and push the tag of the changed bundle; a retry of the perform redeploys it; a snapshot deploy creates no tag. The maven-release-plugin does not setperformRelease, which is why the profile isapache-release. I could not run a release against the real repositories.🤖 Generated with Claude Code