Skip to content
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

Provide a way to override the rpm release number suffix for snapshot builds. #2

Closed
ProggerPete opened this issue Jun 24, 2016 · 7 comments

Comments

Projects
None yet
2 participants
@ProggerPete
Copy link
Contributor

commented Jun 24, 2016

The plugin currently provides a way to override the rpm release number for release builds by specifying the 'release' parameter.

For snapshot builds you can override the rpm release prefix with the 'snapshotReleasePrefix' parameter.

However there is no way to override the rpm release suffix. In my case I would like to set a 'snapshotReleaseSuffix' parameter and make it equal to the build number from our automated build system. (Instead of the default timestamp suffix.)

That way I can easily reference the rpm I've just built in later build steps.

@ProggerPete

This comment has been minimized.

Copy link
Contributor Author

commented Jun 24, 2016

It occurs to me that just allowing the release argument to override the snapshot release number if it's defined is probably even better.

i.e. if the 'release' parameter is specified then always use it, otherwise do your current automatic stuff.

@ctron ctron added the enhancement label Jun 24, 2016

@ctron ctron self-assigned this Jun 24, 2016

@ctron ctron added the need info label Jun 24, 2016

@ctron

This comment has been minimized.

Copy link
Owner

commented Jun 24, 2016

Ok, understood. I will look into this. Hopefully today.

@ctron

This comment has been minimized.

Copy link
Owner

commented Jun 24, 2016

So letting the release property always override it works a bit against the initial idea. Which was to be able to configure the while thing in a top level project and then let it decide on its own wether it is a snapshot build or not and then automatically attach a build id (currently fixed the current time). But constructing a release string which is "0.*" for all snapshots and "1" it this is not a release build.

I do understand that for snpashot builds you don't want to rely on the automatic generated timestamp. And I do understand that. So my proposal would be to define a snapshotBuildTimestamp which defaults to the current format, but only gets picked when it is a snapshot build.

Would that work for you?

@ctron ctron removed the need info label Jun 24, 2016

@ctron

This comment has been minimized.

Copy link
Owner

commented Jun 24, 2016

I did add a forceRelease parameter in addition, so that it is possible to disable the snapshot mechanism altogether and always use the value of the release parameter.

ctron added a commit that referenced this issue Jun 24, 2016

#2: allow providing the snapshot release suffix
This change allows to set the release suffix which is used in case of
snapshot build and also allows to force the build to always use the
main release information, which can be fully specified.

The default behavior is unchanged though.
@ctron

This comment has been minimized.

Copy link
Owner

commented Jun 24, 2016

The change is pushed to Maven Central as version 0.6.0. But you need to wait a bit until it gets actually synced to Maven Central.

@ctron ctron closed this Jun 24, 2016

@ctron

This comment has been minimized.

Copy link
Owner

commented Jun 24, 2016

@ProggerPete

This comment has been minimized.

Copy link
Contributor Author

commented Jun 24, 2016

Both snapshotBuildTimestamp and the forceRelease parameters sound like they'll do the trick for me. Top work. =)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.