Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

snap: release untagged versions from branches to the candidate snap c… #10357

Merged
merged 1 commit into from
Feb 14, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions scripts/gitlab/publish-snap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,19 @@ 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";;
stable) export GRADE="stable" CHANNEL="stable";;
*) 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"

Expand Down Expand Up @@ -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