From 2dcd81d7e72631cb564b09b44f9522ce6916aa50 Mon Sep 17 00:00:00 2001 From: Maximilian Federle Date: Wed, 22 Jan 2020 15:37:14 +0100 Subject: [PATCH] snap: Release snaps to store via script instead of snap provider dpl-snap only supports pushing one snap at a time. Instead of many repetitive deploy statements, we use our own script to loop over the snaps to be released. --- .travis.yml | 10 ++++------ .travis/deploy-snap.sh | 8 ++++++++ 2 files changed, 12 insertions(+), 6 deletions(-) create mode 100755 .travis/deploy-snap.sh diff --git a/.travis.yml b/.travis.yml index 1544ef3d..9e3fa792 100644 --- a/.travis.yml +++ b/.travis.yml @@ -35,17 +35,15 @@ jobs: confinement: classic script: ./.travis/build-snap.sh deploy: - - provider: snap + - provider: script + script: ./.travis/deploy-snap.sh edge skip_cleanup: true - snap: pkg/snap/*.snap - channel: edge on: branch: master tags: false - - provider: snap + - provider: script + script: ./.travis/deploy-snap.sh edge,beta skip_cleanup: true - snap: pkg/snap/*.snap - channel: edge,beta on: branch: master tags: true diff --git a/.travis/deploy-snap.sh b/.travis/deploy-snap.sh new file mode 100755 index 00000000..91674a7c --- /dev/null +++ b/.travis/deploy-snap.sh @@ -0,0 +1,8 @@ +#!/bin/sh -e + +channels="$1" +echo "$SNAP_TOKEN" | snapcraft login --with - + +for snap in ./pkg/snap/*.snap; do + snapcraft push "$snap" --release "$channels" +done