From ee52302eb99041eab4054d78421134c6bf750d8d Mon Sep 17 00:00:00 2001 From: "Denis S. Soldatov aka General-Beck" Date: Wed, 14 Feb 2018 02:39:29 +0300 Subject: [PATCH] Update gitlab-build.sh --- scripts/gitlab-build.sh | 33 +++++++++++++++++++++++++-------- 1 file changed, 25 insertions(+), 8 deletions(-) diff --git a/scripts/gitlab-build.sh b/scripts/gitlab-build.sh index a12347593..b1c9355f7 100755 --- a/scripts/gitlab-build.sh +++ b/scripts/gitlab-build.sh @@ -306,16 +306,33 @@ case $BUILD_PLATFORM in updater_push_release ;; x86_64-unknown-snap-gnu) - cd snap ARC="amd64" EXT="snap" - rm -rf *snap - sed -i 's/git/'"$VER"'/g' snapcraft.yaml - snapcraft - cp "parity_"$CI_BUILD_REF_NAME"_amd64.snap" "parity_"$VER"_amd64.snap" - $MD5_BIN "parity_"$VER"_amd64.snap" > "parity_"$VER"_amd64.snap.md5" - $SHA256_BIN "parity_"$VER"_amd64.snap" > "parity_"$VER"_amd64.snap.sha256" - push_binaries + snapcraft clean + echo "Prepare snapcraft.yaml for build on Gitlab CI in Docker image" + sed -i 's/git/'"$VER"'/g' snap/snapcraft.yaml + if [[ "$CI_BUILD_REF_NAME" = "stable" || "$VER" == *1.8* ]]; + then + sed -i -e 's/grade: devel/grade: stable/' snap/snapcraft.yaml; + fi + mv -f snap/snapcraft.yaml snapcraft.yaml + snapcraft -d + snapcraft_login=$(expect -c " + spawn snapcraft login + expect \"Email:\" + send \"$SNAP_EMAIL\n\" + expect \"Password:\" + send \"$SNAP_PASS\n\" + expect \"\$\" + ") + echo "$snapcraft_login" + snapcraft push "parity_"$VER"_amd64.snap" + snapcraft status parity + snapcraft logout + md5sum "parity_"$VER"_amd64.snap" > "parity_"$VER"_amd64.snap.md5" + echo "add artifacts to archive" + rm -rf parity.zip + zip -r parity.zip "parity_"$VER"_amd64.snap" "parity_"$VER"_amd64.snap.md5" ;; x86_64-pc-windows-msvc) set_env_win