Commit dfc4518a authored by Christian Meyer's avatar Christian Meyer
Browse files

ZmtBasePlugin.groovy: if not in git repository method obtainVersionFromGit

        returns 'UNVERSIONED'
parent ba47fcdf
......@@ -34,6 +34,17 @@ class ZmtBasePlugin implements Plugin<Project> {
*/
private static String obtainVersionFromGit(Project project) {
def output = new ByteArrayOutputStream()
try {
project.exec {
commandLine 'git', 'status'
standardOutput = output
}
}
catch (org.gradle.process.internal.ExecException e) {
// not in a git repository
return "UNVERSIONED"
}
try {
project.exec {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment