From fa570f297ebc27fddab1bbfdaa89d48761a81ef8 Mon Sep 17 00:00:00 2001 From: Afri Schoedon <5chdn@users.noreply.github.com> Date: Thu, 14 Feb 2019 17:24:52 +0100 Subject: [PATCH] snap: release untagged versions from branches to the candidate snap channel (#10357) --- scripts/gitlab/publish-snap.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/scripts/gitlab/publish-snap.sh b/scripts/gitlab/publish-snap.sh index 19cbfa2e6..36d5c5d16 100755 --- a/scripts/gitlab/publish-snap.sh +++ b/scripts/gitlab/publish-snap.sh @@ -9,6 +9,7 @@ set -u # treat unset variables as error TRACK=`awk -F '=' '/^track/ {gsub(/"/, "", $2); gsub(/ /, "", $2); print $2}' ./util/version/Cargo.toml` echo Track is: $TRACK +# Choose snap release channel based on parity ethereum version track case ${TRACK} in nightly) export GRADE="devel" CHANNEL="edge";; beta) export GRADE="stable" CHANNEL="beta";; @@ -16,6 +17,11 @@ case ${TRACK} in *) echo "No release" && exit 0;; esac +# Release untagged versions from branches to the candidate snap channel +case ${CI_COMMIT_REF_NAME} in + beta|stable) export GRADE="stable" CHANNEL="candidate";; +esac + VERSION="v"$VERSION SNAP_PACKAGE="parity_"$VERSION"_"$BUILD_ARCH".snap" @@ -49,8 +55,5 @@ echo "Release channel :" $CHANNEL " Branch/tag: " $CI_COMMIT_REF_NAME echo $SNAPCRAFT_LOGIN_PARITY_BASE64 | base64 --decode > snapcraft.login snapcraft login --with snapcraft.login snapcraft push --release $CHANNEL $SNAP_PACKAGE -case ${CHANNEL} in - beta) snapcraft push --release candidate $SNAP_PACKAGE;; -esac snapcraft status parity snapcraft logout