aboutsummaryrefslogtreecommitdiff
path: root/tools/buildsteps/defaultenv
diff options
context:
space:
mode:
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