From a9fb5408843e27d4260b315b105bc5bc7423ccdc Mon Sep 17 00:00:00 2001 From: Omer Akram Date: Sat, 12 Jun 2021 03:27:59 +0500 Subject: use improved versioning (#6691) --- snap/snapcraft.yaml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'snap') diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index c78e7be2..98640c32 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -31,8 +31,14 @@ parts: snapcraftctl pull tag=$(git describe --tags --abbrev=0) count=$(git rev-list $tag.. --count) - hash=$(git rev-parse --short HEAD) - snapcraftctl set-version $tag+git$count.$hash + if [ "$count" = 0 ]; + then + version=$tag + else + hash=$(git rev-parse --short HEAD) + version=$tag+git$count.$hash + fi + snapcraftctl set-version $version apps: -- cgit v1.2.3