[neon/snap-packaging/gwenview-snap/Neon/master] debian: move KDE_SNAP_BRANCH into snapcraft-lxd script

Carlos De Maine null at kde.org
Mon Aug 19 23:21:16 BST 2024


Git commit b8ae821e4de37cc15b39ba59162f39d11554d3e0 by Carlos De Maine.
Committed on 19/08/2024 at 22:21.
Pushed by carlosdem into branch 'Neon/master'.

move KDE_SNAP_BRANCH into snapcraft-lxd script

M  +0    -10   debian/snap-base-proto.yml
M  +9    -0    debian/snap-snapcraft-lxd-proto.yml

https://invent.kde.org/neon/snap-packaging/gwenview-snap/-/commit/b8ae821e4de37cc15b39ba59162f39d11554d3e0

diff --git a/debian/snap-base-proto.yml b/debian/snap-base-proto.yml
index a0d0214..d0b1b8a 100644
--- a/debian/snap-base-proto.yml
+++ b/debian/snap-base-proto.yml
@@ -14,16 +14,6 @@
     - git clone https://invent.kde.org/sysadmin/repo-metadata.git ci-utilities/repo-metadata/ --depth=1
   script:
     - git config --global --add safe.directory $CI_PROJECT_DIR
-    - |
-      if [ "$KDE_SNAP_BRANCH" == "Neon/master" ]; then 
-        KDE_SNAP_CHANNEL="edge" 
-      done
-      if [ "$KDE_SNAP_BRANCH" == "Neon/release-24.08" ]; then
-        KDE_SNAP_CHANNEL="candidate"
-      done
-      if [ "$KDE_SNAP_BRANCH" == "Neon/release-24.05" ]; then
-        KDE_SNAP_CHANNEL="stable"
-      done
   artifacts:
     name: Snap artifacts
     expose_as: 'KDE neon snaps'
diff --git a/debian/snap-snapcraft-lxd-proto.yml b/debian/snap-snapcraft-lxd-proto.yml
index fddd2c2..4d56c26 100644
--- a/debian/snap-snapcraft-lxd-proto.yml
+++ b/debian/snap-snapcraft-lxd-proto.yml
@@ -33,6 +33,15 @@ snap_snapcraft_lxd:
         done
       fi
   script:
+    # choose channel for publishing based on branch
+    - |
+      if [ "$KDE_SNAP_BRANCH" == "Neon/master" ]; then 
+        export KDE_SNAP_CHANNEL="edge" 
+      elseif [ "$KDE_SNAP_BRANCH" == "Neon/release-24.08" ]; then
+        export KDE_SNAP_CHANNEL="candidate"
+      elseif [ "$KDE_SNAP_BRANCH" == "Neon/release-24.05" ]; then
+        export KDE_SNAP_CHANNEL="stable"
+      done
     # clean
     - snapcraft clean
     # Force usage of LXD for building Snaps


More information about the Neon-commits mailing list