From 2838940c31f248069d16fa80ff3194bfc422204d Mon Sep 17 00:00:00 2001 From: James Date: Wed, 20 Sep 2023 11:32:21 -0500 Subject: [PATCH] Update snapcraft.yaml to auto-set version and grade values with scriptlet --- dist/snapcraft.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dist/snapcraft.yaml b/dist/snapcraft.yaml index a33b575ce8..2433dd341c 100644 --- a/dist/snapcraft.yaml +++ b/dist/snapcraft.yaml @@ -47,9 +47,9 @@ icon: snap/local/freeciv21-client.png parts: freeciv21: override-pull: | - snapcraftctl pull - snapcraftctl set-version `sed -n '2p' snap/local/AutoRevision.txt` - snapcraftctl set-grade "devel" + craftctl default + craftctl set version=`sed -n '2p' ./cmake/AutoRevision.txt | cut -c2-` + craftctl set grade=`case $(sed -n '2p' ./cmake/AutoRevision.txt | cut -c2-) in *-alpha.*) echo devel; ;; *-beta.*) echo devel; ;; *-rc.*) echo candidate; ;; *-patch.*) echo stable; ;; *) echo stable; ;; esac` plugin: cmake source: https://github.com/longturn/freeciv21.git source-type: git