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

snap: prefix version and populate candidate channel #10343

Merged
merged 2 commits into from
Feb 13, 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
6 changes: 5 additions & 1 deletion scripts/gitlab/publish-snap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set -e # fail on any error
set -u # treat unset variables as error

# some necromancy:
# gsub(/"/, "", $2) deletes "qoutes"
# gsub(/"/, "", $2) deletes "qoutes"
# gsub(/ /, "", $2) deletes whitespaces
TRACK=`awk -F '=' '/^track/ {gsub(/"/, "", $2); gsub(/ /, "", $2); print $2}' ./util/version/Cargo.toml`
echo Track is: $TRACK
Expand All @@ -16,6 +16,7 @@ case ${TRACK} in
*) echo "No release" && exit 0;;
esac

VERSION="v"$VERSION
SNAP_PACKAGE="parity_"$VERSION"_"$BUILD_ARCH".snap"

echo "__________Create snap package__________"
Expand Down Expand Up @@ -48,5 +49,8 @@ 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