Coder Social home page Coder Social logo

Comments (7)

netzwerg avatar netzwerg commented on July 24, 2024 1

Thanks for your report and the hint. I will look into it asap.

from gradle-release-plugin.

jthurne avatar jthurne commented on July 24, 2024 1

Your right! Sorry for the false alarm.

from gradle-release-plugin.

jthurne avatar jthurne commented on July 24, 2024

I think changing ReleaseTask Line 76 to this should do the trick:

}.assertNormalExitValue()

See org.gradle.api.Project:exec and ExecResult

from gradle-release-plugin.

netzwerg avatar netzwerg commented on July 24, 2024

Fixed in 1.2.1 (available on Bintray and Gradle plugin central).

from gradle-release-plugin.

jthurne avatar jthurne commented on July 24, 2024

@netzwerg Great! That was impressively fast!

Unfortunately, I just realized something about what I suggested and what you implemented: if the git command fails, then no output from the command will be logged, which would make it pretty hard to figure out why it failed.

Should be another pretty easy fix:

  def result = project.exec { //stuff }
  // print out the output (if any)
  result.assertNormalExitValue()

from gradle-release-plugin.

netzwerg avatar netzwerg commented on July 24, 2024

I tested it with a repo for which I removed all remotes but still have a release { push = true } configuration. The underlying git error is then written to the console:

:release
fatal: 'origin' does not appear to be a git repository
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
:release FAILED

It's not pretty, but should be sufficient to figure out why the build failed.

But you are correct, the output should also be logged – thanks for the pointer!

from gradle-release-plugin.

netzwerg avatar netzwerg commented on July 24, 2024

Actually I do get log entries:

20:59:16.934 [ERROR] [system.err] fatal: 'origin' does not appear to be a git repository
20:59:16.935 [ERROR] [system.err] fatal: Could not read from remote repository.
20:59:16.936 [ERROR] [system.err]
20:59:16.936 [ERROR] [system.err] Please make sure you have the correct access rights
20:59:16.936 [ERROR] [system.err] and the repository exists.

no output from the command will be logged

Do you really see nothing at all?

from gradle-release-plugin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.