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

Commit

Permalink
snap: release untagged versions from branches to the candidate snap c…
Browse files Browse the repository at this point in the history
…hannel (#10357)
  • Loading branch information
5chdn committed Feb 18, 2019
1 parent 683119f commit cfc274e
Showing 1 changed file with 6 additions and 3 deletions.
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

0 comments on commit cfc274e

Please sign in to comment.