passsy / gradle-GitVersioner

generates a project version for the given git project to distinguish between builds
Apache License 2.0
81 stars 22 forks source link

Gradle task get stuck trying to acquire a lock #18

Closed fcesar77 closed 6 years ago

fcesar77 commented 7 years ago

Hi @passy.

We are applying the git-versioner.gradle into our project, and we are facing a problem.

When we run some gradle tasks that makes a call to version.gradle, the build get stuck trying to acquire a lock.

We run the task with the --debug option, I'm sending attached the debug tail, and the exact point the build stops.

Are we doing something wrong? Any clue will be very helpful.

Regards, Fernando Cesar.

buildLock.txt

titoc commented 7 years ago

@passsy We are also facing the same issue as @fcesar77. For us its Windows. I happened to notice that two git.exe processes are started in the task manager.

passsy commented 7 years ago

It seems it's a gradle problem. What gradle version are you running? Alternatively see the new plugin. Support for this script will be dropped

siimv commented 6 years ago

Similar problem here. It executes two git processes (I'm not sure, this is a problem). And it seems to wait indefinitely for git status:

// check if git project
def status = 'git status'.execute([], rootDir)
status.waitFor()

Same problem with the plugin version (there it seems to wait in when (result.exitValue()) {).

Also on the Windows. Gradle is 4.4 and git version is 2.14.1.windows.1 But it happens only in our build server, developer machines work fine.

So it must be some configuration issue I guess, but which one...

passsy commented 6 years ago

I don't support this script anymore. Please upgrade to the gradle plugin: https://github.com/passsy/gradle-gitVersioner-plugin/