Make the build number configurable in VersionNamer
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
Longand, if it works, just useparsed-value + 1 - if the parsing fails, use the specified string
- else if no buildNumber is specified:
- just use the business version alone
@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?