From 8aaa4edbcd2ff0371d40e5b5e2be0c503886e452 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: Thu, 14 Mar 2019 04:58:46 +0800 Subject: [PATCH] Implement selective pulling for building tagged release snaps (#187) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This patch re-implements the pull step that will only build development snapshots snaps if the latest tagged release has been promoted to the stable channel. This ensures that there's always a revision of the stable release snap available in the edge channel for the publisher to promote to stable as currently the build infrastructure only supports build on code push (but not new tagged releases) at this time. The implementation is inspired from the snapcrafters adopted snaps workflow, documented in the following forum topic: The automatic build and pubish process of snaps owned by the Snapcrafters - doc - snapcraft.io https://forum.snapcraft.io/t/autopublishing-of-snapcrafters-organizations-snaps-how/7954/2 Refer the following forum topic for a possible solution proposal of this problem: Proposal: Allow overriding the source-tag property for an one-time build in the build infrastructure - snapcraft - snapcraft.io https://forum.snapcraft.io/t/proposal-allow-overriding-the-source-tag-property-for-an-one-time-build-in-the-build-infrastructure/10303 Signed-off-by: ๆž—ๅšไป(Buo-ren Lin) --- snap/snapcraft.yaml | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index a780f151..352bf924 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -20,9 +20,7 @@ summary: Download image-galleries and -collections from several image hosting si description: | `gallery-dl` is a command-line program to download image-galleries and -collections from several image hosting sites (see [Supported Sites](https://github.com/mikf/gallery-dl/blob/master/docs/supportedsites.rst)). It is a cross-platform tool with many configuration options and powerful filenaming capabilities. -version: determined-by-version-script -version-script: git describe --always --dirty --tags | sed 's/^v//' - +adopt-info: gallery-dl confinement: strict grade: stable @@ -59,8 +57,19 @@ parts: organize: '*': bin/ + selective-pull: + plugin: nil + build-packages: + - git + stage-snaps: + - selective-pull + gallery-dl: + after: + - selective-pull + source: . + override-pull: $SNAPCRAFT_STAGE/scriptlets/selective-pull plugin: python ffmpeg: