]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-build.git/commitdiff
tcmu-runner: handle vX.Y.Z-rcX git tag formats 856/head
authorJason Dillaman <dillaman@redhat.com>
Fri, 1 Sep 2017 13:43:17 +0000 (09:43 -0400)
committerJason Dillaman <dillaman@redhat.com>
Fri, 1 Sep 2017 13:44:46 +0000 (09:44 -0400)
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
tcmu-runner/build/build_rpm

index f050dfc8e726f8c9626535accbb91d7ceec1f0be..38b8712f5be10df5b410562bfef8b75e5e188568 100644 (file)
@@ -79,8 +79,8 @@ gzip ${DESTDIR}/usr/share/man/man8/tcmu-runner.8
 ## Get some basic information about the system and the repository
 # Get version
 RELEASE="$(lsb_release --short -r | cut -d '.' -f 1)" # system release
-VERSION="$(git describe --abbrev=0 --tags HEAD)"
-REVISION="$(git describe --tags HEAD | cut -d - -f 2- | sed 's/-/./')"
+VERSION="$(git describe --abbrev=0 --tags HEAD | cut -d - -f 1)"
+REVISION="$(git describe --tags HEAD | cut -d - -f 2- | sed 's/-/./' | sed 's/^rc/0./')"
 
 ## Create the package
 # Make sure there are no other packages, first