Skip to content

Commit

Permalink
Use developmentVersion parameter also in interactive mode - closes #404
Browse files Browse the repository at this point in the history
  • Loading branch information
aleksandr-m committed Jun 21, 2024
1 parent 444ac42 commit 514831f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,7 @@ public class GitFlowReleaseFinishMojo extends AbstractGitFlowMojo {
private boolean digitsOnlyDevVersion = false;

/**
* Development version to use instead of the default next development
* version in non interactive mode.
* Development version to use instead of the default next development version.
*
* @since 1.6.0
*/
Expand Down Expand Up @@ -336,7 +335,7 @@ public void execute() throws MojoExecutionException, MojoFailureException {
if (!commitDevelopmentVersionAtStart && !skipReleaseMergeDevBranch) {
// get next snapshot version
final String nextSnapshotVersion;
if (!settings.isInteractiveMode() && StringUtils.isNotBlank(developmentVersion)) {
if (StringUtils.isNotBlank(developmentVersion)) {
nextSnapshotVersion = developmentVersion;
} else {
GitFlowVersionInfo versionInfo = new GitFlowVersionInfo(currentVersion, getVersionPolicy());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,7 @@ public class GitFlowReleaseMojo extends AbstractGitFlowMojo {
private boolean digitsOnlyDevVersion = false;

/**
* Development version to use instead of the default next development
* version in non interactive mode.
* Development version to use instead of the default next development version.
*
* @since 1.6.0
*/
Expand Down Expand Up @@ -293,7 +292,7 @@ public void execute() throws MojoExecutionException, MojoFailureException {

// get next snapshot version
final String nextSnapshotVersion;
if (!settings.isInteractiveMode() && StringUtils.isNotBlank(developmentVersion)) {
if (StringUtils.isNotBlank(developmentVersion)) {
nextSnapshotVersion = developmentVersion;
} else {
GitFlowVersionInfo versionInfo = new GitFlowVersionInfo(version, getVersionPolicy());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,7 @@ public class GitFlowReleaseStartMojo extends AbstractGitFlowMojo {
private boolean digitsOnlyDevVersion = false;

/**
* Development version to use instead of the default next development
* version in non interactive mode.
* Development version to use instead of the default next development version.
*
* @since 1.7.0
*/
Expand Down Expand Up @@ -242,7 +241,7 @@ public void execute() throws MojoExecutionException, MojoFailureException {

private String getNextSnapshotVersion(String currentVersion) throws MojoFailureException, VersionParseException {
final String nextSnapshotVersion;
if (!settings.isInteractiveMode() && StringUtils.isNotBlank(developmentVersion)) {
if (StringUtils.isNotBlank(developmentVersion)) {
nextSnapshotVersion = developmentVersion;
} else {
GitFlowVersionInfo versionInfo = new GitFlowVersionInfo(currentVersion, getVersionPolicy());
Expand Down

0 comments on commit 514831f

Please sign in to comment.