jdeb icon indicating copy to clipboard operation
jdeb copied to clipboard

Ability to use a package release number

Open laeti-tia opened this issue 10 years ago • 3 comments

Is there a way I can have a package release number being used by jdeb?

I'd like to be able to version my Debian packages with a scheme such as:

  • 1.5.1**-1**~20150701123456
  • 1.5.1**-1**
  • 1.5.1**-2**
  • 1.5.2**-1**

The number after the - is this release number, it would only change when there is a change in the Debian package but nothing has changed in the source code or any configuration files. This is a regular practice in the Debian packaging world.

I can use a property in my pom.xml file to track this release number, but how can I use in the package version generated? I've looked at the documentation but couldn't find any way to make such a versionning pattern.

Does that exists in some way? If not, consider this a feature request. :-)

Thanks.

laeti-tia avatar Jul 01 '15 15:07 laeti-tia

I looked as well, the only thing that looks remotely similar are snapshotExpand and snapshotEnv options, but SNAPSHOT expansion is happening after "tilde" and this should be happening in the middle of version string. And this versioning scheme is needed for both releases and snapshots.

For release version [[version]] expansion could be used along with user defined property from pom.xml, but for snapshots there is not really easy way to do this.

RockyMM avatar Jul 01 '15 15:07 RockyMM

I think tracking these kind of changes is out of scope for jdeb. You could define a variable and pass it from maven/ant - but we would then have allow to configure the version string better. I guess that's 2.x material.

As a workaround you could modify the [[buildDir]]/[[artifactId]]_[[version]]_all.[[extension]] pattern and provide your own version instead. Not sure I am thinking of all corner cases - but I guess that could work.

tcurdt avatar Jan 16 '16 02:01 tcurdt

I have a similar problem as I release quite often for small changes and have versions like: target/foo-20160503T152414-5a8b795.jar i.e. ${timestamp}-${buildNumber}.

It would be great if the [[version]] tag from src/deb/control/control could simply be set in the pom.xml like:

                    <configuration>
                        <verbose>true</verbose>
                        <version>${timestamp}-${buildNumber}</version>

lathspell avatar May 03 '16 13:05 lathspell