Skip to content

Commit

Permalink
ci: snap: other core22 updates
Browse files Browse the repository at this point in the history
  • Loading branch information
yktoo committed Oct 2, 2023
1 parent 13492ed commit 34c7293
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions snap/snapcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 34c7293

Please sign in to comment.