aboutsummaryrefslogtreecommitdiff
path: root/ci/snap/deploy.sh
blob: 9f556b9eb89f325f4a3fccac8ae94b844088b0ff (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/usr/bin/env bash

set -e
set -o pipefail

# not a tagged release, abort
[[ "$TRAVIS_TAG" != "$TRAVIS_BRANCH" ]] && exit 0

openssl aes-256-cbc -K $encrypted_0a6446eb3ae3_key \
  -iv $encrypted_0a6446eb3ae3_iv \
  -in .snapcraft/travis_snapcraft.cfg \
  -out .snapcraft/snapcraft.cfg -d

SNAP=$(find ./ -name "*.snap")

if [[ "$SNAP" =~ "dirty" || "$SNAP" =~ "nightly" ]]; then
  snapcraft push "$SNAP" --release edge
else
  snapcraft push "$SNAP" --release candidate
fi