summaryrefslogtreecommitdiff
path: root/snap
diff options
context:
space:
mode:
authorOmer Akram <om26er@gmail.com>2021-06-12 03:27:59 +0500
committerGitHub <noreply@github.com>2021-06-11 15:27:59 -0700
commita9fb5408843e27d4260b315b105bc5bc7423ccdc (patch)
tree92f9d9d3f1aa83827c118a8a49140a562422ddf6 /snap
parent337eb8b8f72ea2f5d409af357ea07c397b146f56 (diff)
downloadflatbuffers-a9fb5408843e27d4260b315b105bc5bc7423ccdc.tar.gz
flatbuffers-a9fb5408843e27d4260b315b105bc5bc7423ccdc.tar.bz2
flatbuffers-a9fb5408843e27d4260b315b105bc5bc7423ccdc.zip
use improved versioning (#6691)
Diffstat (limited to 'snap')
-rw-r--r--snap/snapcraft.yaml10
1 files changed, 8 insertions, 2 deletions
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: