nebula-release-plugin icon indicating copy to clipboard operation
nebula-release-plugin copied to clipboard

Provide support for `-Drelease.scope=minor`

Open liviutudor opened this issue 6 years ago • 5 comments

I have a bunch of Jenkins jobs which use this plugin and depending on how the job gets invoked I want to increment the major, minor or patch version of my package. I can use -Drelease.scope=major for major version increases and -Drelease.scope=patch for patch version but there is no support for -Drelease.scope=minor -- can we add this in?

liviutudor avatar Nov 06 '18 00:11 liviutudor

I'll stand corrected, using minor works however using minor (extra space) doesn't :) So my suggestion now is going to be to trim the string -- I'll actually submit a PR myself for this, sorry about the confusion.

liviutudor avatar Nov 06 '18 00:11 liviutudor

Think we'd be better off failing-fast on an unexpected value, rather than trying to sanitize incoming input - otherwise we're just asking for that to fail other places we might refer to the property.

DanielThomas avatar Nov 06 '18 00:11 DanielThomas

I don't see that property used somewhere else; and when dealing with things like Jenkins configuration I often see trailing space(s) appearing. I agree that the fault is with incoming bad data but at the same time it's a small change for us which does eliminate such common annoyances.

liviutudor avatar Nov 06 '18 01:11 liviutudor

That still allows the plugin to fail on other invalid inputs, we're better off dealing with all cases of invalid values.

DanielThomas avatar Nov 06 '18 01:11 DanielThomas

Or are you saying it doesn't, and this was actually throwing an exception? How does this fail/not?

DanielThomas avatar Nov 06 '18 01:11 DanielThomas