From 34c7293ad28ed768524aa30184114011dc8778b0 Mon Sep 17 00:00:00 2001 From: Dmitry Kann Date: Mon, 2 Oct 2023 14:31:26 +0200 Subject: [PATCH] ci: snap: other core22 updates --- snap/snapcraft.yaml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index 6b7fd80..bdb10c2 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -28,24 +28,26 @@ parts: ymuse: plugin: go source: . + build-snaps: + - go/latest/stable build-packages: - git - gcc - gettext override-pull: | - snapcraftctl pull + craftctl default # Use version from git version="$(git describe --always --tags)" - snapcraftctl set-version "$version" - snapcraftctl set-grade "$(echo $version | grep -q '-' && echo devel || echo stable)" + craftctl set version="$version" + craftctl set grade="$(echo $version | grep -q '-' && echo devel || echo stable)" override-build: | set -eu go generate CGO_LDFLAGS="-s -w -X main.version=$(git describe --always --tags) -X main.commit=$(git rev-parse HEAD) -X main.date=$(date --iso-8601=seconds)" - go build -o "${SNAPCRAFT_PART_INSTALL}" + go build -o "${CRAFT_PART_INSTALL}" resources: plugin: dump @@ -59,7 +61,7 @@ parts: - com.yktoo.ymuse.desktop override-pull: | - snapcraftctl pull + craftctl default # Fix icon path in the .desktop sed -i -E 's!^Icon=.*!Icon=/usr/share/icons/hicolor/scalable/apps/com.yktoo.ymuse.svg!' com.yktoo.ymuse.desktop