snap: Incorporate selective-checkout to ensure a revision for stable channel is always available

Refer-to: Selective-checkout: Check out the tagged release revision if it isn't promoted to the stable channel - doc - snapcraft.io <https://forum.snapcraft.io/t/selective-checkout-check-out-the-tagged-release-revision-if-it-isnt-promoted-to-the-stable-channel/10617>
Refer-to: Releasing your app - Documentation for snaps: Universal Linux packages <https://docs.snapcraft.io/releasing-your-app/6795>
Signed-off-by: 林博仁(Buo-ren Lin) <Buo.Ren.Lin@gmail.com>
This commit is contained in:
林博仁(Buo-ren Lin) 2019-04-12 00:55:02 +08:00
parent 15a9925d2a
commit 6fdf37ef89

View File

@ -43,6 +43,8 @@ plugs:
parts: parts:
glances: glances:
after:
- selective-checkout
plugin: python plugin: python
source: . source: .
# FIXME: Theoretically this also replaces `summary` and `description` # FIXME: Theoretically this also replaces `summary` and `description`
@ -52,8 +54,7 @@ parts:
parse-info: [setup.py] parse-info: [setup.py]
override-pull: | override-pull: |
snapcraftctl pull snapcraftctl pull
snapcraftctl set-version \ "$SNAPCRAFT_STAGE"/scriptlets/selective-checkout
"$(git describe --always --dirty --tags --match 'v*' | sed s/^v//)"
bottle: bottle:
plugin: python plugin: python
source: https://github.com/bottlepy/bottle.git source: https://github.com/bottlepy/bottle.git
@ -69,3 +70,11 @@ parts:
plugin: dump plugin: dump
organize: organize:
'*': bin/ '*': bin/
selective-checkout:
plugin: nil
build-packages:
- git
stage-snaps:
- selective-checkout
prime:
- -*