New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
an option to disable rc/alpha/beta version processing #594
Comments
While I am not against adding (yet) another switch I am not sure the reason is totally sound. AFAIR using a git hash like that is against the debian rules and might cause problems anyway. https://www.debian.org/doc/debian-policy/ch-controlfields.html#version I've used number of commits (since the last release) over the sha in the past for something like this. |
I am not sure that using git hash is exactly against debian rules, but it does mess up the versions sorting of all other parts are the same. Another example of the current behaviour - And after a bit of though - my actual problem is that the generated deb version is directly linked to the maven artefact version. The templates in the deb file can either use the "raw" And the version suitable for the maven artefacts (for example JARs published to the repo) is not guaranteed to be suitable for deb package published to the apt repo. So problem reframing - provide an option to specify the final deb version which can be different from the Still an additional mojo parameter. |
I am required to use git hash in all our internal artefacts (JARs, deb packages and docker images) for, your know, security reasons. 😜 |
Well, it's no longer sortable - and AFAIK that is a requirement. So what I would do is to have number of commits and maybe append the hash for kicks.
That certainly is an idea. But it also feels for a very limited audience.
I am not totally against that. But I don't quite see when you wouldn't want to the two versions to match. |
We are actually using the number of commits and the hash as part of our versioning scheme for JARs right now, so i do need a way to prevent the accidental mangling of The To better conform to deb version rules, i would prefer to place the whole hash in the deb version after the This is where explicit One more thing about hypothetical The epoch will need a bit of the special handling too - as far as i understand, it should be present in the So, my current thought - the new
|
I'll be honest. I am happy to accept modifications but the current suggestion feels like a bit of a work around. 99% of the user should not have tinker with the
With This is what the debian docs say:
from https://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-version Which is why I guess what could work is:
Maybe work out a scheme and then start by adding that to the testcase. What is your marker for a pre-release? |
Let me know how you want to move forward here. |
"For historical reasons" our current versioning scheme for maven project version is Also, right now we are using At the very least, i would like to use jdeb to build the deb package, and for that i need a way to leave the This can be solved either by just detecting the Also, that The epoch support can't be really implemented over something based on the plain My current take to solve all of these in the backward-compatible way: introduce a new
The idea is that by default everything works like now, but the user can explicitly set the If it is completely different then the user is completely responsible for it. |
Sorry for the late reply. I am open to a new version property and deprecate the old way. The versions processing still feels like a lot of magic though. |
You can disable processing of rc/alpha/beta versions in Maven by setting <maven.buildNumber.incrementer.skip>true</maven.buildNumber.incrementer.skip> in your pom.xml. |
@inglepriyanka148867 this isn't about maven build number increments but the target version of the debian package. |
Thanks, I'll check it out!
…On Tue, 16 Apr, 2024, 4:22 pm Torsten Curdt, ***@***.***> wrote:
@inglepriyanka148867 <https://github.com/inglepriyanka148867> this isn't
about maven build number increments but the target version of the debian
package.
—
Reply to this email directly, view it on GitHub
<#594 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/BEK54ZIBFVDNJJ5TQG2PKBTY5T7HDAVCNFSM6AAAAAA7PRAWUKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANJYHAYDEMBTGU>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
The rc/alpha/beta version processing is too aggressive due to overly generic pattern in https://github.com/tcurdt/jdeb/blob/master/src/main/java/org/vafer/jdeb/utils/Utils.java#L44 that matches single
a
,b
andm
letters surrounded by numbers.We are using git hash as part of the final artifact name, and would like to use (almost) the same string as the deb version, but the current processing messes with some git hashes that happen to have
a
orb
surrounded by numbers, for example1.0-a0ff00
becomes1.0~a0ff00
1.0-ff00a0
becomes1.0+ff00~a0
I am not sure if it is even possible to "fix" the regex because while the
a0ff00
is a git hash for me it is quite possible that it is alpha version named0ff00
for somebody else.I propose to add a new mojo parameter
betaExpand
(similar to the existingsnapshotExpand
) that will control whether the rc/alpha/beta processing should be used.The default value should be
true
to match the current behavior.When set to
false
, the examples above would be1.0-a0ff00
becomes1.0+a0ff00
1.0-ff00a0
becomes1.0+ff00a0
and the user is responsible for any issues related to the version ordering.
Related issues #172 and #210.
The text was updated successfully, but these errors were encountered: