summaryrefslogtreecommitdiffstats
path: root/build-root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'build-root/scripts')
-rwxr-xr-xbuild-root/scripts/version5
1 files changed, 2 insertions, 3 deletions
diff --git a/build-root/scripts/version b/build-root/scripts/version
index bf7e31551b9..8724ced3c18 100755
--- a/build-root/scripts/version
+++ b/build-root/scripts/version
@@ -15,13 +15,12 @@ fi
if [ "$1" = "rpm-release" ]; then
[ -z "${ADD}" ] && echo release && exit
- CMT=$(git describe --dirty --match 'v*'| cut -s -d- -f3,4 | sed 's/-/_/')
- echo ${ADD}~${CMT}${BLD}
+ echo ${ADD}${CMT:+~${CMT}}${BLD}
exit
fi
if [ -n "${ADD}" ]; then
- echo ${TAG}-${ADD}~${CMT}${BLD}
+ echo ${TAG}-${ADD}${CMT:+~${CMT}}${BLD}
else
echo ${TAG}
fi