snap: fix path in script (#10157)

* snap: fix path in script

* debug, revert me

* fix

* necromancer awk magic

* awk necromancy and path fixing

* working track selection
This commit is contained in:
Afri Schoedon 2019-01-10 10:58:30 +01:00 committed by GitHub
parent 010cfb7d67
commit 4d66e8d06d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 2 deletions

View File

@ -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"