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

Failed builds for empty git repositories #295

Closed
acoburn opened this issue Mar 18, 2019 · 2 comments
Closed

Failed builds for empty git repositories #295

acoburn opened this issue Mar 18, 2019 · 2 comments
Labels

Comments

@acoburn
Copy link

acoburn commented Mar 18, 2019

I have a project that uses this plugin. When I upgraded from version 2.7.0 to 2.8.0, the gradle build fails immediately in cases where the source code does not have a ./.git directory, e.g. when someone "downloads" from github rather than cloning the repository. This is also relevant for AWS CodeBuild pipelines, since the code is downloaded rather than cloned in those cases.

It appears that this issue was introduced in this commit: 4e43ac3, specifically this line.

Here is some sample output:

$ gradle clean 

> Configure project :
Running [git, branch, --no-color] produced an error: [fatal: not a git repository (or any of the parent directories): .git]

The underlying exception is Caused by: org.gradle.api.GradleException: Error, this repository is empty.

This occurs with every gradle task (including clean as shown above), not just a release-related task. I wouldn't mind if this failed for the release task, but failing like this on build-related tasks is a bit of a show-stopper.

This issue is very similar to #286

@Hillkorn Hillkorn added the bug label Mar 19, 2019
@Hillkorn Hillkorn pinned this issue Mar 19, 2019
@Hillkorn
Copy link
Collaborator

I'll have to make it lazy.

Thanks for the report.

@loginet-vfeher
Copy link

Is there any progress with this issue? We are using 2.7.0 of the plugin regarding this bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants