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

Reverting change on failed build isn't working for multi-project build with Mercurial #184

Open
swpalmer opened this issue Jul 8, 2016 · 4 comments

Comments

@swpalmer
Copy link

swpalmer commented Jul 8, 2016

:Installer:release FAILED
Release process failed, reverting back any changes made by Release Plugin.
Running [hg, revert, gradle.properties] produced an error: [no changes needed to gradle.properties]
Release process failed, reverting back any changes made by Release Plugin.
Running [hg, revert, gradle.properties] produced an error: [no changes needed to gradle.properties]
Release process failed, reverting back any changes made by Release Plugin.
Running [hg, revert, gradle.properties] produced an error: [no changes needed to gradle.properties]
Release process failed, reverting back any changes made by Release Plugin.
Running [hg, revert, gradle.properties] produced an error: [no changes needed to gradle.properties]
Release process failed, reverting back any changes made by Release Plugin.
Running [hg, revert, gradle.properties] produced an error: [no changes needed to gradle.properties]
Release process failed, reverting back any changes made by Release Plugin.
Running [hg, revert, gradle.properties] produced an error: [no changes needed to gradle.properties]
Release process failed, reverting back any changes made by Release Plugin.
Running [hg, revert, gradle.properties] produced an error: [no changes needed to gradle.properties]

$ hg st
M Installer\gradle.properties
M Client\gradle.properties
M ClientGui\gradle.properties
M ClientGuiDistribution\gradle.properties
M Model\gradle.properties
M Server\gradle.properties
M ServerDistribution\gradle.properties

@jjkavalam
Copy link

Could it be that there is a bug in GitAdapter.groovy ?

It seems to assume gradle.properties is always exactly 1 level deep from the root of the git repo ?

    @Override
    void revert() {
        // Revert changes on gradle.properties
        exec(['git', 'checkout', findPropertiesFile().name], directory: workingDirectory, errorMessage: 'Error reverting changes made by the release plugin.')
    }

@Hillkorn
Copy link
Collaborator

@jjkavalam Should not be related to this as GitAdapter should only be used for git projects I think. Do you have this issue in git too?

@jjkavalam
Copy link

@Hillkorn At this point I am not sure if what am reporting is indeed related to @swpalmer

However, I have prepared a git repo that can be reproduces the problem I was referring to.

Please see: https://github.com/jjkavalam/gradle-release-issue-184

Let me summarize what is demonstrated there:

The demonstrated issue is that, while trying to revert changes to gradle.properties (potentially due to some legitimate error case during release), the plugin issues an invalid git checkout as evident from the logs:

Running [git, checkout, gradle.properties] produced an error: [error: pathspec 'gradle.properties' did not match any file(s) known to git.]              

This happens because gradle.properties is assumed to be at the root of the git repository; but for the example I have given, the file is located elsewhere.

@arthurtaborda
Copy link

I also have the same problem. Is there any way to fix that?

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