multi-module-maven-release-plugin icon indicating copy to clipboard operation
multi-module-maven-release-plugin copied to clipboard

Make the build number configurable in VersionNamer

Open cdprete opened this issue 6 years ago • 1 comments

Hi. At the moment, the build number is just a long and there is, for what I can see, no way to configure it differently in order to get something like <business-version>-<timestamp>-<commit-hash>.

There is already a delimiter property for separating the business version from "the rest", so what is missing is a way to specify such values. The easiest way would be to make the buildNumber a String and it would then be up to the user to pass the value to use.

In this way - as side effect - would also be possible to remove the build number if it's not wanted (keeping the String null).

A possible strategy would be:

  • if the buildNumber is specified:
    • if the string is not null and not empty, then attach the delimiter
    • try to parse it as Long and, if it works, just use parsed-value + 1
    • if the parsing fails, use the specified string
  • else if no buildNumber is specified:
    • just use the business version alone

cdprete avatar Jun 20 '19 10:06 cdprete

@danielflower this seems like a useful new feature and a well thought-out idea. What do you think? Would a PR to that effect stand a chance getting accepted?

marcelstoer avatar Jul 04 '19 13:07 marcelstoer