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

Prompt for new version #42

Closed
jycr opened this issue Mar 31, 2017 · 23 comments
Closed

Prompt for new version #42

jycr opened this issue Mar 31, 2017 · 23 comments

Comments

@jycr
Copy link

jycr commented Mar 31, 2017

In interactive mode, by default, mvn gitflow:release asks/prompts for the released version, but not for the new development version.

Is it possible to also ask the user to enter the version number for the next development version (SNAPSHOT)?

@aleksandr-m
Copy link
Owner

Smells too much like the release plugin. :) Why do you want this? What the use case?

@jycr
Copy link
Author

jycr commented Apr 3, 2017

Exactly.
But maybe I misunderstood the use of this plugin?
I thought that with gitflow-maven-plugin, I did not have to use the plugin maven-release-plugin. But maybe I was wrong?

Do I have to use both at the same time?

@aleksandr-m
Copy link
Owner

I thought that with gitflow-maven-plugin, I did not have to use the plugin maven-release-plugin.

Correct.

But why do you want that the next development version would be something different than x.x.x+1-SNAPSHOT ?

@jycr
Copy link
Author

jycr commented Apr 3, 2017

Following http://semver.org, we usually work on next version X.X+1.0
X.X.X+1 is reserved for fixes (only if needed after QA phase).

@aleksandr-m
Copy link
Owner

But using semver doesn't mean that your next snapshot version should be X.X+1.0. What are you going to do if you want to develop patch in the feature branch or in the hotfix? Downgrade version manually?

@jycr
Copy link
Author

jycr commented Apr 4, 2017

When we need to develop a hotfix, we create a branch from tag which represents production deployed version.

@aleksandr-m
Copy link
Owner

How about boolean property which if set will increment minor version number instead of patch number?

@jycr
Copy link
Author

jycr commented Apr 5, 2017 via email

@aleksandr-m
Copy link
Owner

With boolean you don't have to type every time x.x+1.0. What will happen if you want this behavior in not interactive mode?

@jycr
Copy link
Author

jycr commented Apr 7, 2017

I think I did not understand correctly

So you suggest a setting that:

  • if true: suggests entering the version in interactive mode
  • if it is false, keep the same behavior as at present?

If that's right, it would be perfect for me :)

@bjansen
Copy link

bjansen commented Apr 14, 2017

I agree with @jycr's original request, it would be nice for the plugin to ask what the next SNAPSHOT version is.

But why do you want that the next development version would be something different than x.x.x+1-SNAPSHOT

I could ask the same question for the version to be released: if the current version is x.x.x-SNAPSHOT, why would you want to release something other than x.x.x? Yet the plugin still asks what version it should set 😉 .

OTOH, it would be convenient to ask for the next SNAPSHOT version (with a default set to x.x.x+1-SNAPSHOT). Developers can simply hit enter to select that default version, or specify a different version if they want to use x.x+1.x instead of x.x.x+1.

@aleksandr-m
Copy link
Owner

@bjansen It is not the same. The release version isn't known until the actual release is happening, so it has to be entered upon releasing.

Developers can simply hit enter to select that default version

If someone is using x.x+1.x pattern for the next snapshot version then they're forced to type it every time on releasing. Much more convenient would be to configure which number will be incremented.

Just curious, how do you decide what next snapshot version will be? How often do you change next snapshot version pattern for the project?

@ghost
Copy link

ghost commented May 7, 2017

from my point of view it could be nice feature. At least would be nice to fix it like when I enter different release version than default, next shapshot will continue from that(entered/released) version, not remain with incrementing default...

how to reproduce:

  1. current develop branch snapshot is "0.1.0-SNAPSHOT"
  2. running gitflow:release I enter "1.0.0" as desired release
  3. now current master branch version is "1.0.0", OK
  4. but now current develop branch version is "0.1.1-SNAPSHOT". I would expect version "1.0.1-SNAPSHOT" here

@aleksandr-m
Copy link
Owner

@mireczatko Well, it should be 1.0.1-SNAPSHOT. Could you create a separate issue for that, so I don't forget about it.

As for the feature request at hand, same questions:

Just curious, how do you decide what next snapshot version will be? How often do you change next snapshot version pattern for the project?

@ghost
Copy link

ghost commented May 8, 2017

@aleksandr-m, I created new issue: #47

regarding your questions: yeah, to be honest, I found this problem developping my little private project where there is no release management at all. I just suddenly decided, this will be version 1.0.0 😃

@danielborges93
Copy link

The implementation of DefaultVersionInfo always increment the last digit of the actual version. So it is not a "problem" of this plugin.

@jbadeau
Copy link

jbadeau commented Jun 22, 2017

Our issues is this.

We tag our release like: releaseVersion=1.0.0-Final
The development branch is changed to 1.0.1-final-SNAPSHOT
We want: 1.0.1-SNAPSHOT

I have patched the required Mojos to accept an optional parameter called 'developmentVersion' to allow custom naming of the new development version.

Would you be interested in a pull request? Or you rather not introduce this feature?

@aleksandr-m
Copy link
Owner

@jbadeau Finally, some real use case. :) Another option is to introduce parameter which when set will remove qualifiers from version. Wdyt?

@jbadeau
Copy link

jbadeau commented Jun 23, 2017

Would also work for us 👌

@marandalucas
Copy link

@jbadeau I have the same problem. I would like to have that optiontional parameter 'developmentVersion'
Could you provide it? Thanks

@jbadeau
Copy link

jbadeau commented Jun 26, 2017

@aleksandr-m Do you have an ETA on a release? Can I help you in some way?

@aleksandr-m
Copy link
Owner

aleksandr-m commented Jun 26, 2017

Here we go:

The developmentVersion in non interactive mode will set next development version.

mvn gitflow:release-finish -B -DdevelopmentVersion=3.0.0-SNAPSHOT

The digitsOnlyDevVersion when set will remove qualifiers from the release version.
E.g.
Release version: 1.0.0-Final -> Development version: 1.0.1-SNAPSHOT.


The versionDigitToIncrement adds ability to increment major/minor/whatever digit in the version.
E.g.

mvn gitflow:release-finish -DversionDigitToIncrement=1

Release version: 1.2.3.4 -> Development version: 1.3.0.0-SNAPSHOT.


@jbadeau Of course. Pull, build, test. Feedback is welcome. :)

ETA on release? If no problem arises, then probably sometime this week.

@jbadeau
Copy link

jbadeau commented Jun 28, 2017

Sounds great. :)

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

6 participants