summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRiku Voipio <riku.voipio@linaro.org>2015-02-02 21:07:41 +0200
committerRiku Voipio <riku.voipio@linaro.org>2015-02-02 21:08:00 +0200
commit21c3a30436c4eef9136efc8864dbbf7c000cf9dc (patch)
tree8c3df386d0142d7ea04d64d34326f8f2cf16cfa4
parent875500a5b42045cef7a649dcfc2ada30da4752ac (diff)
downloadlibvirt-ci-21c3a30436c4eef9136efc8864dbbf7c000cf9dc.tar.gz
version number fix
It seems setting the version number may fail, pull the tags and try again
-rwxr-xr-xjenkinsbuild.sh5
1 files changed, 5 insertions, 0 deletions
diff --git a/jenkinsbuild.sh b/jenkinsbuild.sh
index 7ad78d6..82ff61e 100755
--- a/jenkinsbuild.sh
+++ b/jenkinsbuild.sh
@@ -100,6 +100,11 @@ cd ${WORKSPACE}
cd ${code_checkout_dir}
pkg_version=`git describe --match='v*' |sed -e 's/^v//' -e 's/-rc/~rc/' -e 's/-\([0-9]*\)-/+git\1+/' `
+if [ -z $pkg_version ];
+then
+ git fetch --tags
+ pkg_version=`git describe --match='v*' |sed -e 's/^v//' -e 's/-rc/~rc/' -e 's/-\([0-9]*\)-/+git\1+/' `
+fi
cd ${WORKSPACE}
echo "pkg_version: :${pkg_version}:"