aboutsummaryrefslogtreecommitdiff
path: root/tools/buildsteps/defaultenv
diff options
context:
space:
mode:
authorMemphiz <memphis@machzwo.de>2013-08-05 21:34:25 +0200
committerMemphiz <memphis@machzwo.de>2013-08-05 21:34:25 +0200
commitafb5a6998c0c0a191e88ae53671df79fc00d55b2 (patch)
tree58fb4c4fdadf9e58cace85e0738c306211de9517 /tools/buildsteps/defaultenv
parentbc79663c72f9ead4831d4176435fa5fd0f2b0939 (diff)
[jenkins] - use a new method to determine the branch name by ignoring the pr ref_spec - thx to theuni for figuring that out
Diffstat (limited to 'tools/buildsteps/defaultenv')
-rw-r--r--tools/buildsteps/defaultenv2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/buildsteps/defaultenv b/tools/buildsteps/defaultenv
index 93d3c13148..52d22eef46 100644
--- a/tools/buildsteps/defaultenv
+++ b/tools/buildsteps/defaultenv
@@ -119,7 +119,7 @@ function getBuildRevDateStr ()
if [ "$?" == "0" ]
then
#fetch the first branch containing head
- revStr=$revStr"-"`git branch -r --contains HEAD | sed "/origin\/pr\//d" | head -n1 | awk '{gsub(".*/","");print $1}'`
+ revStr=$revStr"-"`git name-rev --ref=refs/heads/* --name-only HEAD | head -n1 | awk '{gsub(".*/","");print $1}'`
if [ "$?" == "0" ]
then
echo $revStr