From 6fdf37ef8973fb7afbc90fafdfeb56cd1ff114b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9E=97=E5=8D=9A=E4=BB=81=28Buo-ren=20Lin=29?= Date: Fri, 12 Apr 2019 00:55:02 +0800 Subject: [PATCH] snap: Incorporate selective-checkout to ensure a revision for stable channel is always available MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Refer-to: Selective-checkout: Check out the tagged release revision if it isn't promoted to the stable channel - doc - snapcraft.io Refer-to: Releasing your app - Documentation for snaps: Universal Linux packages Signed-off-by: ๆž—ๅšไป(Buo-ren Lin) --- snap/snapcraft.yaml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index 767833e3..cb7efbc2 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -43,6 +43,8 @@ plugs: parts: glances: + after: + - selective-checkout plugin: python source: . # FIXME: Theoretically this also replaces `summary` and `description` @@ -52,8 +54,7 @@ parts: parse-info: [setup.py] override-pull: | snapcraftctl pull - snapcraftctl set-version \ - "$(git describe --always --dirty --tags --match 'v*' | sed s/^v//)" + "$SNAPCRAFT_STAGE"/scriptlets/selective-checkout bottle: plugin: python source: https://github.com/bottlepy/bottle.git @@ -69,3 +70,11 @@ parts: plugin: dump organize: '*': bin/ + selective-checkout: + plugin: nil + build-packages: + - git + stage-snaps: + - selective-checkout + prime: + - -*