terrestris / maven-semantic-release

Apache License 2.0
13 stars 7 forks source link

Support ci-friendly versions #33

Open gdupontf opened 11 months ago

gdupontf commented 11 months ago

Support for ci-friendly versions would be greatly appreciated.

The way I see it the defaults would be :

With some way of overriding this behaviour for the odd case.

simonseyock commented 9 months ago

How and where should these values get injected?

gdupontf commented 9 months ago

Just inject into the revision property along with versions:update-property. For compatibility's sake that should be an alternative toggleable behavior.

There might be value in injecting into the sha1 and changelist properties but targeting revision would be the MVS.

simonseyock commented 9 months ago

We are just using maven to update the version:

https://github.com/terrestris/maven-semantic-release/blob/82c3967e3160d2c64b44eaca306df096a0a87e17/src/maven.js#L17-L36

and also for deployment:

https://github.com/terrestris/maven-semantic-release/blob/82c3967e3160d2c64b44eaca306df096a0a87e17/src/maven.js#L75-L100

Can you please provide the exact commands you would use with maven to achieve this? For me it is still unclear where the injected versions should appear - only in the published pom.xml?

gdupontf commented 7 months ago

A project's version can't be any placeholder property except those 3. Usually in the form of ${revision}${sha1}${changelist}. First two are obvious and changelist is typically either your usual alpha/beta variant and/or a simple -SNAPSHOT placeholder.

Depending on release branch and strategy, you'd have various (but consistent) combinations of these.

simonseyock commented 4 months ago

I still do not know what command you specifically want to run with versions:update-property. Please provide the exact command you would like to have run.

As stated we run versions:set with the version string provided by semantic release. It is Revision.version from https://github.com/semantic-release/semantic-release/blob/dabdd1d3b3c486026b2e34757d1af5a036f81f5a/index.d.ts#L342C20-L342C29. What else would you want exactly, where would this values come from?