diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 90e59f9c9..ab6a4a2ab 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -18,9 +18,9 @@ linux-stable: stage: build image: parity/rust:gitlab-ci only: + - stable - beta - tags - - stable - triggers script: - rustup default stable @@ -36,9 +36,9 @@ linux-stable-debian: stage: build image: parity/rust-debian:gitlab-ci only: + - stable - beta - tags - - stable - triggers script: - export LIBSSL="libssl1.1 (>=1.1.0)" @@ -53,9 +53,9 @@ linux-centos: stage: build image: parity/rust-centos:gitlab-ci only: + - stable - beta - tags - - stable - triggers script: - scripts/gitlab-build.sh x86_64-unknown-centos-gnu x86_64-unknown-linux-gnu x86_64 gcc g++ @@ -69,9 +69,9 @@ linux-i686: stage: build image: parity/rust-i686:gitlab-ci only: + - stable - beta - tags - - stable - triggers script: - scripts/gitlab-build.sh i686-unknown-linux-gnu i686-unknown-linux-gnu i386 gcc g++ @@ -85,9 +85,9 @@ linux-armv7: stage: build image: parity/rust-armv7:gitlab-ci only: + - stable - beta - tags - - stable - triggers script: - scripts/gitlab-build.sh armv7-unknown-linux-gnueabihf armv7-unknown-linux-gnueabihf armhf arm-linux-gnueabihf-gcc arm-linux-gnueabihf-g++ @@ -101,9 +101,9 @@ linux-arm: stage: build image: parity/rust-arm:gitlab-ci only: + - stable - beta - tags - - stable - triggers script: - scripts/gitlab-build.sh arm-unknown-linux-gnueabihf arm-unknown-linux-gnueabihf armhf arm-linux-gnueabihf-gcc arm-linux-gnueabihf-g++ @@ -117,9 +117,9 @@ linux-aarch64: stage: build image: parity/rust-arm64:gitlab-ci only: + - stable - beta - tags - - stable - triggers script: - scripts/gitlab-build.sh aarch64-unknown-linux-gnu aarch64-unknown-linux-gnu arm64 aarch64-linux-gnu-gcc aarch64-linux-gnu-g++ @@ -143,15 +143,15 @@ linux-snap: - rust-stable artifacts: paths: - - scripts/parity_*_amd64.snap + - snap/parity.zip name: "stable-x86_64-unknown-snap-gnu_parity" allow_failure: true darwin: stage: build only: + - stable - beta - tags - - stable - triggers script: - scripts/gitlab-build.sh x86_64-apple-darwin x86_64-apple-darwin macos gcc g++ @@ -167,9 +167,9 @@ windows: untracked: true stage: build only: + - stable - beta - tags - - stable - triggers script: - sh scripts/gitlab-build.sh x86_64-pc-windows-msvc x86_64-pc-windows-msvc installer "" "" "" @@ -182,6 +182,8 @@ windows: docker-build: stage: build only: + - stable + - beta - tags - triggers before_script: @@ -244,8 +246,8 @@ js-release: stage: js-build only: - master - - beta - stable + - beta - tags - triggers image: parity/rust:gitlab-ci diff --git a/scripts/gitlab-build.sh b/scripts/gitlab-build.sh index 876658822..6bebb85e6 100755 --- a/scripts/gitlab-build.sh +++ b/scripts/gitlab-build.sh @@ -270,15 +270,33 @@ case $BUILD_PLATFORM in push_release ;; x86_64-unknown-snap-gnu) - cd snap ARC="amd64" EXT="snap" - rm -rf *snap - sed -i 's/master/'"$VER"'/g' snapcraft.yaml - snapcraft - cp "parity_"$CI_BUILD_REF_NAME"_amd64.snap" "parity_"$VER"_amd64.snap" + 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/' 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" - push_binaries + 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 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 7be9c0bf7..c0ca5507b 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -13,9 +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