diff options
Diffstat (limited to 'ci/snap')
-rwxr-xr-x | ci/snap/after_success.sh | 14 | ||||
-rwxr-xr-x | ci/snap/deploy.sh | 21 | ||||
-rwxr-xr-x | ci/snap/install.sh | 10 | ||||
-rwxr-xr-x | ci/snap/script.sh | 8 | ||||
-rw-r--r-- | ci/snap/travis_snapcraft.cfg | bin | 0 -> 2448 bytes |
5 files changed, 53 insertions, 0 deletions
diff --git a/ci/snap/after_success.sh b/ci/snap/after_success.sh new file mode 100755 index 0000000000..e66721a5e2 --- /dev/null +++ b/ci/snap/after_success.sh @@ -0,0 +1,14 @@ +#!/usr/bin/env bash + +set -e +set -o pipefail + + +RESULT_SNAP=$(find ./ -name "*.snap") + +sudo snap install "$RESULT_SNAP" --dangerous --classic + +/snap/bin/nvim --version + +SHA256=$(sha256sum "$RESULT_SNAP") +echo "SHA256: ${SHA256} ." diff --git a/ci/snap/deploy.sh b/ci/snap/deploy.sh new file mode 100755 index 0000000000..5fbd52d775 --- /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 + +mkdir -p .snapcraft +# shellcheck disable=SC2154 +openssl aes-256-cbc -K "$encrypted_ece1c4844832_key" -iv "$encrypted_ece1c4844832_iv" \ + -in ci/snap/travis_snapcraft.cfg -out .snapcraft/snapcraft.cfg -d + +SNAP=$(find ./ -name "*.snap") + +# TODO(justinmk): This always does `edge` until we enable tagged builds. +if [[ "$SNAP" =~ "dirty" || "$SNAP" =~ "nightly" ]]; then + snapcraft push "$SNAP" --release edge +else + snapcraft push "$SNAP" --release candidate +fi diff --git a/ci/snap/install.sh b/ci/snap/install.sh new file mode 100755 index 0000000000..23e0bc5eb8 --- /dev/null +++ b/ci/snap/install.sh @@ -0,0 +1,10 @@ +#!/usr/bin/env bash + +set -e +set -o pipefail + +sudo apt update +sudo /snap/bin/lxd.migrate -yes +sudo /snap/bin/lxd waitready +sudo /snap/bin/lxd init --auto + diff --git a/ci/snap/script.sh b/ci/snap/script.sh new file mode 100755 index 0000000000..647cda4874 --- /dev/null +++ b/ci/snap/script.sh @@ -0,0 +1,8 @@ +#!/usr/bin/env bash + +set -e +set -o pipefail + +mkdir -p "$TRAVIS_BUILD_DIR/snaps-cache" +sudo snapcraft --use-lxd + diff --git a/ci/snap/travis_snapcraft.cfg b/ci/snap/travis_snapcraft.cfg Binary files differnew file mode 100644 index 0000000000..3e6a60c30d --- /dev/null +++ b/ci/snap/travis_snapcraft.cfg |