Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[jenkins] - add the branchname to the package names

  • Loading branch information...
commit b4c05c094d0c625bff09904af410c81a4083b81c 1 parent 279fec3
@Memphiz Memphiz authored
Showing with 14 additions and 2 deletions.
  1. +14 −2 tools/buildsteps/defaultenv
View
16 tools/buildsteps/defaultenv
@@ -105,8 +105,20 @@ function tagSuccessFulBuild ()
function getBuildRevDateStr ()
{
- git --no-pager log --abbrev=7 -n 1 --pretty=format:"%h %ci" HEAD | awk '{gsub("-", "");print $2"-"$1}' 2>/dev/null
- if [ "$?" != "0" ]; then
+ local revStr
+ #fetch date-rev
+ revStr=`git --no-pager log --abbrev=7 -n 1 --pretty=format:"%h %ci" HEAD | awk '{gsub("-", "");print $2"-"$1}' 2>/dev/null`
+ if [ "$?" == "0" ]
+ then
+ #fetch the first branch containing head
+ revStr=$revStr"-"`git branch -r --contains HEAD | head -n1 | awk '{gsub(".*/","");print $1}'`
+ if [ "$?" == "0" ]
+ then
+ echo $revStr
+ else
+ echo "Unknown"
+ fi
+ else
echo "Unknown"
fi
}
Please sign in to comment.
Something went wrong with that request. Please try again.