]> git.apps.os.sepia.ceph.com Git - ceph-build.git/commitdiff
rtslib-fb/tcmu-runner: strip 'v' prefix from RPM version 954/head
authorJason Dillaman <dillaman@redhat.com>
Tue, 13 Feb 2018 19:26:19 +0000 (14:26 -0500)
committerJason Dillaman <dillaman@redhat.com>
Tue, 13 Feb 2018 19:27:46 +0000 (14:27 -0500)
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
rtslib-fb/build/build_rpm
tcmu-runner/build/build_rpm

index fd67a016916c3c159fb1cc7d364d6ac3e0edb323..eac9627e3dba877aa99d41a2fdc8fd74bd4957fd 100644 (file)
@@ -20,8 +20,8 @@ sudo gem install fpm
 ## 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 | sed -e 's/v//1;')"
+REVISION="$(git describe --tags HEAD | sed -e 's/v//1;' | cut -d - -f 2- | sed 's/-/./')"
 if [ "$VERSION" = "$REVISION" ]; then
   REVISION="1"
 fi
index a88fb19666702641651382600abf69e99a30084c..7ded5f1c68f9138835a7f9d7e6864a16b33238f7 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 | cut -d - -f 1)"
-REVISION="$(git describe --tags HEAD | cut -d - -f 2- | sed 's/-/./g' | sed 's/^rc/0./')"
+VERSION="$(git describe --abbrev=0 --tags HEAD | sed -e 's/v//1;' | cut -d - -f 1)"
+REVISION="$(git describe --tags HEAD | sed -e 's/v//1;' | cut -d - -f 2- | sed 's/-/./g' | sed 's/^rc/0./')"
 if [ "$VERSION" = "$REVISION" ]; then
   REVISION="1"
 fi