From 021177af0d495a3e3c1b1b802b6646c8b29bef0f Mon Sep 17 00:00:00 2001 From: Omer Akram Date: Mon, 7 Jun 2021 21:16:13 +0500 Subject: [PATCH] Fix snap version formatting (#6683) --- snap/snapcraft.yaml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index c0bc939df..c78e7be2b 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -1,6 +1,6 @@ name: flatbuffers base: core18 -version: git +adopt-info: flatc summary: FlatBuffers compiler description: | FlatBuffers compiler @@ -26,10 +26,18 @@ parts: - -DCMAKE_BUILD_TYPE=Release build-packages: - g++ + - git + override-pull: | + 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 + apps: flatc: - command: flatc + command: bin/flatc plugs: - home - removable-media