aboutsummaryrefslogtreecommitdiff
path: root/ci/snap/deploy.sh
diff options
context:
space:
mode:
Diffstat (limited to 'ci/snap/deploy.sh')
-rwxr-xr-xci/snap/deploy.sh21
1 files changed, 21 insertions, 0 deletions
diff --git a/ci/snap/deploy.sh b/ci/snap/deploy.sh
new file mode 100755
index 0000000000..9f556b9eb8
--- /dev/null
+++ b/ci/snap/deploy.sh
@@ -0,0 +1,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
+