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.
pull/545/head
Maximilian Federle 2020-01-22 15:37:14 +01:00 committed by whitequark
parent d5351c48e3
commit 2dcd81d7e7
2 changed files with 12 additions and 6 deletions

View File

@ -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

8
.travis/deploy-snap.sh Executable file
View File

@ -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