Comments (10)
I've opened a pull request ...
#34
from gradle-release-plugin.
Thanks for the report and the PR.
this leads to the problem that when git command is called it cant interprete correctly
Could you please specify
- how the problem manifests itself (build failure? truncated commit message?)
- on which platform/setup (git version?) it occurs
- possibly giving exacts steps of how to reproduce the problem
I am asking because nobody has ever had an issue with this and the code has been like this for ages...
from gradle-release-plugin.
git version 2.8.1.windows.1
14:37:29.002 [INFO] [org.gradle.process.internal.DefaultExecHandle] Starting process 'command 'git''. Working directory: D:\Projects\XYZ Command: git commit -m Release v0.0.1 version.txt
14:37:29.344 [ERROR] [org.gradle.BuildExceptionReporter] FAILURE: Build failed with an exception.
14:37:29.344 [ERROR] [org.gradle.BuildExceptionReporter]
14:37:29.344 [ERROR] [org.gradle.BuildExceptionReporter] * What went wrong:
14:37:29.344 [ERROR] [org.gradle.BuildExceptionReporter] Execution failed for task ':release'.
14:37:29.344 [ERROR] [org.gradle.BuildExceptionReporter] > Process 'command 'git'' finished with non-zero exit value 1
14:37:29.344 [ERROR] [org.gradle.BuildExceptionReporter]
14:37:29.344 [ERROR] [org.gradle.BuildExceptionReporter] * Try:
14:37:29.344 [ERROR] [org.gradle.BuildExceptionReporter] Run with --stacktrace option to get the stack trace.
14:37:29.344 [LIFECYCLE] [org.gradle.BuildResultLogger]
14:37:29.344 [LIFECYCLE] [org.gradle.BuildResultLogger] BUILD FAILED
gradlew --version
Gradle 2.13
Build time: 2016-04-25 04:10:10 UTC
Build number: none
Revision: 3b427b1481e46232107303c90be7b05079b05b1c
Groovy: 2.4.4
Ant: Apache Ant(TM) version 1.9.6 compiled on June 29 2015
JVM: 1.8.0_91 (Oracle Corporation 25.91-b14)
OS: Windows 10 10.0 amd64
from gradle-release-plugin.
But the same applies on our Teamcity build agent ....
from gradle-release-plugin.
Thanks, I will look into it.
from gradle-release-plugin.
Please also see my pull request. I guess my changes wont hurt anyway.
from gradle-release-plugin.
def git(Object[] arguments) {
LOGGER.debug("git $arguments")
def output = new ByteArrayOutputStream()
def result = project.exec {
executable 'git'
args arguments
standardOutput output
ignoreExitValue = true
}
// output result to debug
String gitOutput = output.toString().trim()
if (!gitOutput.isEmpty()) {
LOGGER.debug(gitOutput)
}
// check if successful after logging
result.assertNormalExitValue()
}
I have changed the method for calling the git executable as throwing the error via "assertNormalExitValue()" surpressed logging of the output.
I get bad git exit status as i already have a commit wating for push.
15:50:21.504 [DEBUG] [org.gradle.process.internal.DefaultExecHandle] Process 'command 'git'' finished with exit value 1 (state: FAILED)
15:50:21.507 [DEBUG] [ch.netzwerg.gradle.release.ReleaseTask] On branch master
Your branch is ahead of 'origin/master' by 6 commits.
(use "git push" to publish your local commits)
nothing to commit, working directory clean
That seems to be the real cause of my issue.
But i wasnt able to see that as the output was not logged correctly.
from gradle-release-plugin.
Thanks for the clarifications. Your changes with respect to logging make sense, thanks for updating the PR.
Concerning the quoting: Is this still an issue for you? If yes, we would need a platform-specific fix (possibly with more investigation/testing). If no, could you please create a new PR with just the logging changes – tia!
from gradle-release-plugin.
Release v1.2.5 including your logging changes should be available on Bintray jcenter soon...
from gradle-release-plugin.
Thank you very much.
from gradle-release-plugin.
Related Issues (20)
- Should it be mentioned it works only with git?
- Push to current branch rather than master
- Multi-project setup: `release.dependsOn` configuration should not be mandatory HOT 7
- Clarify docs about the version pattern
- Provide different release tasks for upgrading different parts of the version HOT 1
- All tasks only increment patch version (in submodules) HOT 7
- Version.txt in subprojects HOT 2
- Stop relying on `project.afterEvaluate` for project version initialization
- Wrong message upon version parsing exception
- Could not determine the dependencies of task ':release' HOT 2
- Build succeeds even if git push fails HOT 7
- Master branch is moved after pushing with the plugin HOT 2
- pass in authentication credential and patch release HOT 2
- Add `releasePatchVersion` task (identical to current `release` task)
- Hook to publish release HOT 6
- Support usage of abbreviated task names
- Issue with Single Quotes on Windows HOT 3
- Add support for flavor based version.txt HOT 1
- Unable the push tags HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gradle-release-plugin.