Run snap build sooner to better mask the delay

This commit is contained in:
Michael Vines
2018-06-24 09:53:40 -07:00
committed by Grimes
parent 8ef8a8dea7
commit b2accd1c2a
2 changed files with 5 additions and 5 deletions

32
ci/snap.sh Executable file
View File

@@ -0,0 +1,32 @@
#!/bin/bash -e
cd "$(dirname "$0")/.."
DRYRUN=
if [[ -z $BUILDKITE_BRANCH || $BUILDKITE_BRANCH =~ pull/* ]]; then
DRYRUN="echo"
fi
if [[ -z "$BUILDKITE_TAG" ]]; then
SNAP_CHANNEL=edge
else
SNAP_CHANNEL=beta
fi
if [[ -n $SNAPCRAFT_CREDENTIALS_KEY ]]; then
(
openssl aes-256-cbc -d \
-in ci/snapcraft.credentials.enc \
-out ci/snapcraft.credentials \
-k "$SNAPCRAFT_CREDENTIALS_KEY"
snapcraft login --with ci/snapcraft.credentials
) || {
rm -f ci/snapcraft.credentials;
exit 1
}
fi
set -x
snapcraft
$DRYRUN snapcraft push solana_*.snap --release $SNAP_CHANNEL