From 8eb379a8f0e0b35175cd574c26afdae951604dd2 Mon Sep 17 00:00:00 2001 From: tkellner Date: Tue, 26 Nov 2013 10:35:18 +0000 Subject: Update git-svn revision parsing for windows git-svn-id: https://joinup.ec.europa.eu/svn/mocca/trunk@1224 8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4 --- BKUWebStart/pom.xml | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) (limited to 'BKUWebStart') diff --git a/BKUWebStart/pom.xml b/BKUWebStart/pom.xml index c7882a76..e70114a3 100644 --- a/BKUWebStart/pom.xml +++ b/BKUWebStart/pom.xml @@ -199,7 +199,7 @@ development - ${pom.url} + ${project.url} at/gv/egiz/bku/webstart/splash.png @@ -213,8 +213,8 @@ buildnumber-git @@ -236,9 +236,19 @@ - def gitSvnProc = ["sh", "-c", "git svn info | awk '/Revision:/ { print \$2 }'"].execute() + def shell = "sh" + def param = "-c" + if (System.getProperty("os.name").toUpperCase().contains("WINDOWS")) { + shell = "cmd" + param = "/c" + } + def gitSvnProc = [shell, param, "git svn info | grep Revision:"].execute() gitSvnProc.waitFor() - project.properties['gitSvnRev'] = gitSvnProc.in.text.trim() + def svnref = "unknown" + def out = gitSvnProc.in.text.split(" ") + if (out.size() == 2) + svnref = out[1].trim() + project.properties['gitSvnRev'] = svnref -- cgit v1.2.3