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

Make the build number configurable in VersionNamer #75

Open
cdprete opened this issue Jun 20, 2019 · 1 comment
Open

Make the build number configurable in VersionNamer #75

cdprete opened this issue Jun 20, 2019 · 1 comment

Comments

@cdprete
Copy link

cdprete commented Jun 20, 2019

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
@marcelstoer
Copy link
Contributor

@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 added a commit to marcelstoer/multi-module-maven-release-plugin that referenced this issue Sep 19, 2019
This required changing the `buildNumber` data type from `long` to `String`.

Fixes danielflower#75
marcelstoer added a commit to marcelstoer/multi-module-maven-release-plugin that referenced this issue Sep 19, 2019
This required changing the `buildNumber` data type from `long` to `String`.

Fixes danielflower#75
marcelstoer added a commit to marcelstoer/multi-module-maven-release-plugin that referenced this issue Oct 22, 2019
This required changing the `buildNumber` data type from `long` to `String`.

Fixes danielflower#75
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants