aboutsummaryrefslogtreecommitdiffstats
path: root/build-root/scripts
diff options
context:
space:
mode:
authorEd Warnicke <eaw@cisco.com>2016-05-31 14:04:16 -0700
committerDave Wallace <dwallacelf@gmail.com>2016-05-31 21:46:45 +0000
commit750c62548eb10e79ff35a963df248ccfb064ec24 (patch)
tree31a0ffe46dbcdab0ca682ede4dc7eabcafc401f8 /build-root/scripts
parent34e7772443f57f4fa561b4affb682329fb9f3bc4 (diff)
Fix build-root/scripts/version to not have spurious ~
Change-Id: Id28f134e3a4aa19c5756014d53004501db0d0c88 Signed-off-by: Ed Warnicke <eaw@cisco.com>
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 bf7e3155..8724ced3 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