gradle-release-plugin
gradle-release-plugin copied to clipboard
unable to release because of local modifications
When I try to release under Windows 7x64 with following configuration:
release { failOnSnapshotDependencies = true allowLocalModifications = false releaseDryRun = false scm = 'git' username = gitUser password = gitPassword }
I receive allways:
"Uncommited changes found in the source tree"
Of course, there are no changes :)
Is the logic hier:
def boolean hasLocalModifications() {
gitExec(['status', '--porcelain']) != ""
}
correct?
gitExec(['status', '--porcelain']) != null
is probably correct... I think the behaviour changed at some point. I should probably move to jgit when I have a chance...
ok. thanks for response
I also get "Uncommited changes found in the source tree" when building in bash with "gradle release" even though there are no uncommitted changes.
I don't understand your response @ari can you elaborate how to get round this?
@Jorik1977 - did you resolve this?
I use
allowLocalModifications = true
and check git modifications manually :)
Worked a treat, thanks!!
Same problem here Ari.
You are using org.gradle.api.Project.exec
which apparently is executing git
from the OS. However running git status --porcelain
gives me no result which means no uncommitted changes. Not sure if this is something related to how you set the ExecSpec closure?
I'm having this same issue. I have a brand new repo with 2 files: build.gradle & .gitignore I have master checked out & the version of my master == version of remote master However, when I attempt to run a release, it complains of gradle release -PreleaseVersion=1.0.1 :release FAILED
FAILURE: Build failed with an exception.
-
What went wrong: Execution failed for task ':release'.
Uncommited changes found in the source tree
-
Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 2.032 secs