From c697e40e84ac813f9867281bbf68775c302d4160 Mon Sep 17 00:00:00 2001 From: "Denis S. Soldatov aka General-Beck" Date: Thu, 1 Feb 2018 16:17:40 +0300 Subject: [PATCH] snapcraft push stable --- scripts/gitlab-build.sh | 13 ++++++------- snap/gui/parity.desktop | 2 +- snap/snapcraft.yaml | 12 +++++++++++- 3 files changed, 18 insertions(+), 9 deletions(-) diff --git a/scripts/gitlab-build.sh b/scripts/gitlab-build.sh index 245f22729..6bebb85e6 100755 --- a/scripts/gitlab-build.sh +++ b/scripts/gitlab-build.sh @@ -270,18 +270,17 @@ case $BUILD_PLATFORM in push_release ;; x86_64-unknown-snap-gnu) - cd snap ARC="amd64" EXT="snap" - rm -rf *.snap - rm -rf *snap - sed -i 's/git/'"$VER"'/g' snapcraft.yaml - sed -i -e 's/source: ./source: ../' snapcraft.yaml + 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" ]]; then - sed -i -e 's/grade: devel/grade: stable/' snapcraft.yaml; + sed -i -e 's/grade: devel/grade: stable/' snap/snapcraft.yaml; fi - snapcraft + mv -f snap/snapcraft.yaml snapcraft.yaml + snapcraft -d snapcraft_login=$(expect -c " spawn snapcraft login expect \"Email:\" diff --git a/snap/gui/parity.desktop b/snap/gui/parity.desktop index 46453b7fd..c8f83be73 100644 --- a/snap/gui/parity.desktop +++ b/snap/gui/parity.desktop @@ -4,5 +4,5 @@ Encoding=UTF-8 Name=parity Comment=Fast, light, robust Ethereum implementation Exec=parity -Icon=${SNAP}/meta/gui/icon.png +Icon=/usr/share/pixmaps/icon.png Terminal=true diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index 336c36ad4..c0ca5507b 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -13,10 +13,20 @@ confinement: strict apps: parity: command: parity - plugs: [network, network-bind, mount-observe, x11, unity7] + plugs: [home, network, network-bind, mount-observe, x11, unity7, desktop, desktop-legacy, wayland] + desktop: usr/share/applications/parity.desktop +icon: snap/gui/icon.png parts: + desktop-icon: + source: ./snap + plugin: nil + prepare: | + mkdir -p $SNAPCRAFT_PART_INSTALL/usr/share/applications + mkdir -p $SNAPCRAFT_PART_INSTALL/usr/share/pixmaps + cp -v gui/parity.desktop $SNAPCRAFT_PART_INSTALL/usr/share/applications/ + cp -v gui/icon.png $SNAPCRAFT_PART_INSTALL/usr/share/pixmaps/ parity: source: . plugin: rust