From: Ali Maredia Date: Tue, 2 May 2017 15:53:14 +0000 (-0400) Subject: nfs-ganesha: set VERSION correctly in rpm builds X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F700%2Fhead;p=ceph-build.git nfs-ganesha: set VERSION correctly in rpm builds $VERSION now set properly for "dev-X" & "rcX" versions in rpm builds of nfs-ganesha. Signed-off-by: Ali Maredia --- diff --git a/nfs-ganesha/build/build_rpm b/nfs-ganesha/build/build_rpm index 8d381fbd..f591e771 100644 --- a/nfs-ganesha/build/build_rpm +++ b/nfs-ganesha/build/build_rpm @@ -92,7 +92,7 @@ echo "\"\"\"" >> nfs-ganesha.cfg echo "Building RPMs" sudo mock --verbose -r nfs-ganesha.cfg --define "dist .el7" --resultdir=$WORKSPACE/dist/RPMS/ ${SRPM} || ( tail -n +1 $WORKSPACE/dist/RPMS/{root,build}.log && exit 1 ) -VERSION=`grep -om 1 '[[:digit:]]\+\.[[:digit:]]\+-dev-[[:digit:]]\+' $WORKSPACE/nfs-ganesha/build/include/config.h` +VERSION=`grep -R "#define GANESHA_VERSION \"" $WORKSPACE/nfs-ganesha/build/include/config.h | sed -e 's/#define GANESHA_VERSION "//1; s/"//1;'` chacra_endpoint="nfs-ganesha/${NFS_GANESHA_BRANCH}/${GIT_COMMIT}/${DISTRO}/${RELEASE}" chacra_repo_endpoint="${chacra_endpoint}/flavors/${FLAVOR}" RPM_RELEASE=`grep Release $WORKSPACE/nfs-ganesha/src/nfs-ganesha.spec | sed 's/Release:[ \t]*//g' | cut -d '%' -f 1`