From da45f641d6e22a65540c377756e1623f52eedae2 Mon Sep 17 00:00:00 2001 From: Damon Barry Date: Wed, 13 Mar 2024 13:08:49 -0700 Subject: [PATCH] Set snap grade according to version --- snap/snapcraft.yaml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index 60b80ec5..f5552c39 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -9,7 +9,6 @@ description: | license: MIT -grade: devel # must be 'stable' to release into candidate/stable channels confinement: strict parts: @@ -61,6 +60,13 @@ parts: - libtss2-sys1 - libtss2-tctildr0 override-build: | + # if version contains substring "dev" set grade to devel, else stable + SC_VERSION="$(craftctl get version)" + if test "${SC_VERSION#*dev}" != "$SC_VERSION" ; then + craftctl set grade=devel + else + craftctl set grade=stable + fi contrib/third-party-notices.sh > THIRD-PARTY-NOTICES make install-deb \ ARCH=$CRAFT_ARCH_BUILD_FOR \