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

hotfix-finish: plugin fails when remote already up to date #296

Open
Steph0 opened this issue May 5, 2021 · 3 comments
Open

hotfix-finish: plugin fails when remote already up to date #296

Steph0 opened this issue May 5, 2021 · 3 comments

Comments

@Steph0
Copy link

Steph0 commented May 5, 2021

Hello,
First of all, thanks for this amazing pluging
I come across a very strange case where the plugin fails for a reason that does not seem right.

What happens is that for some reason, 'master' and 'dev' are already merged.
I would expect not to fail and just continue (and updating the version in snapshot for example).

Note: same error in version 1.16.0 of this roject

Error:

[INFO] Committing changes.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:14 min
[INFO] Finished at: 2021-05-05T16:35:46Z
[INFO] Final Memory: 27M/302M
[INFO] ------------------------------------------------------------------------
Error:  Failed to execute goal com.amashchenko.maven.plugin:gitflow-maven-plugin:1.15.1:hotfix-finish (default-cli) on project api-ecm: hotfix-finish: On branch dev
Error:  Your branch is up to date with 'origin/dev'.
Error:  
Error:  nothing to commit, working tree clean
Error:  -> [Help 1]
Error:  
Error:  To see the full stack trace of the errors, re-run Maven with the -e switch.
Error:  Re-run Maven using the -X switch to enable full debug logging.
Error:  
Error:  For more information about the errors and possible solutions, please read the following articles:
Error:  [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

Command:

./mvnw -B gitflow:hotfix-finish -Prelease -DpushRemote="true" -DhotfixVersion="${hotfix_version}" \
            -DkeepBranch=false -DmvnExecutable="./mvnw"

Maven profile:

<profile>
            <id>release</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>com.amashchenko.maven.plugin</groupId>
                        <artifactId>gitflow-maven-plugin</artifactId>
                        <version>1.15.1</version>
                        <configuration>
                            <gitFlowConfig>
                                <productionBranch>master</productionBranch>
                                <developmentBranch>dev</developmentBranch>
                            </gitFlowConfig>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
            <properties>
                <!-- gitflow release plugin configuration -->
                <digitsOnlyDevVersion>true</digitsOnlyDevVersion>
                <skipTestProject>true</skipTestProject>
                <versionDigitToIncrement>1</versionDigitToIncrement>
            </properties>
        </profile>

Maven version: Apache Maven 3.5.0
JDK: 8 (latest)

Thanks for your help!

@aleksandr-m
Copy link
Owner

It would be nice to have this controlled by some parameter, but then we need to check diff or dry-run it first.

@asterioproba
Copy link

Is there any workaround for this bug?

@OldIMP
Copy link

OldIMP commented Apr 28, 2023

Same problem for release-finish. Is there any update? Thx!

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

4 participants