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

Commit

Permalink
snap: fix path in script (#10157)
Browse files Browse the repository at this point in the history
* snap: fix path in script

* debug, revert me

* fix

* necromancer awk magic

* awk necromancy and path fixing

* working track selection
  • Loading branch information
5chdn authored Jan 10, 2019
1 parent 010cfb7 commit 4d66e8d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions scripts/gitlab/publish-snap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,17 @@
set -e # fail on any error
set -u # treat unset variables as error

TRACK=`awk -F '=' '/^track/ {print $2}' ./util/version/Cargo.toml`
# some necromancy:
# 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

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;;
*) echo "No release" && exit 0;;
esac

SNAP_PACKAGE="parity_"$VERSION"_"$BUILD_ARCH".snap"
Expand Down

0 comments on commit 4d66e8d

Please sign in to comment.