From: Jason Dillaman Date: Fri, 1 Sep 2017 13:43:17 +0000 (-0400) Subject: tcmu-runner: handle vX.Y.Z-rcX git tag formats X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=75ccaa16a951faa752a622ab1dddcdc52585a11d;p=ceph-build.git tcmu-runner: handle vX.Y.Z-rcX git tag formats Signed-off-by: Jason Dillaman --- diff --git a/tcmu-runner/build/build_rpm b/tcmu-runner/build/build_rpm index f050dfc8..38b8712f 100644 --- a/tcmu-runner/build/build_rpm +++ b/tcmu-runner/build/build_rpm @@ -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