From 0e79989a71c871a67987b0953e3a1a8c0155ac58 Mon Sep 17 00:00:00 2001 From: Daniel Beck <1831569+daniel-beck@users.noreply.github.com> Date: Thu, 27 Oct 2022 22:06:31 +0200 Subject: [PATCH] Provide a quicker command to see versions, add it to all sections --- .../developer/publishing/releasing-cd.adoc | 20 +++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/content/doc/developer/publishing/releasing-cd.adoc b/content/doc/developer/publishing/releasing-cd.adoc index cb82365b8b9d..b9041f021118 100644 --- a/content/doc/developer/publishing/releasing-cd.adoc +++ b/content/doc/developer/publishing/releasing-cd.adoc @@ -152,8 +152,8 @@ You can see examples of the proposed snapshot and release versions in your case + [source,shell] ---- -mvn validate -mvn validate -Dset.changelist -Dignore.dirt +mvn help:evaluate -Dexpression=project.version +mvn help:evaluate -Dexpression=project.version -Dset.changelist -Dignore.dirt ---- + IMPORTANT: Note that you will very quickly create releases with version numbers greater than 100, as the major version component corresponds to the number of commits in the branch you're releasing from. @@ -193,6 +193,14 @@ This could be appropriate if you are leery of committing up front to having majo with no option of going back to `maven-release-plugin`-style versioning except by starting at say `1000.1`, because version numbers going forward must be mathematically larger than any currently on the update center. + +You can see examples of the proposed snapshot and release versions in your case by running: ++ +[source,shell] +---- +mvn help:evaluate -Dexpression=project.version +mvn help:evaluate -Dexpression=project.version -Dset.changelist -Dignore.dirt +---- ++ IMPORTANT: It is _not recommended_ to implement actual semantic versioning with automated releases performed by CD, as that requires great care in always changing the `revision` as part of the changes that semantically would require a `revision` change for the next release. Otherwise, automated releases may have version numbers that semantically would not make sense. @@ -223,6 +231,14 @@ Similar to the previous option, for a component whose version number ought to re ---- + Here the version numbers will look like `4.0.0-123.vabcdef456789` or `4.0.0-999999-SNAPSHOT`, respectively. +You can see examples of the proposed snapshot and release versions in your case by running: ++ +[source,shell] +---- +mvn help:evaluate -Dexpression=project.version +mvn help:evaluate -Dexpression=project.version -Dset.changelist -Dignore.dirt +---- ++ Use the `revision` property for the `` declaration to ensure they always match: + [source,xml]