From 2473068a1adfcac3d141b4f20fa30e0369912a55 Mon Sep 17 00:00:00 2001 From: Mike Farah Date: Tue, 16 Jan 2024 15:06:29 +1100 Subject: [PATCH] Attempt to use the latest snapcraft build --- scripts/bump-version.sh | 11 ++++++++++- snap/snapcraft.yaml | 21 +++++++++++++++------ 2 files changed, 25 insertions(+), 7 deletions(-) diff --git a/scripts/bump-version.sh b/scripts/bump-version.sh index dee77fb3..b8f472cb 100755 --- a/scripts/bump-version.sh +++ b/scripts/bump-version.sh @@ -27,7 +27,7 @@ else echo "version.go updated" fi - version=$version ./yq -i '.version=strenv(version)' snap/snapcraft.yaml + version=$version ./yq -i '.version=strenv(version) | .parts.yq.source-tag=strenv(version)' snap/snapcraft.yaml actualSnapVersion=$(./yq '.version' snap/snapcraft.yaml) @@ -38,6 +38,15 @@ else echo "snapcraft updated" fi +actualSnapVersion=$(./yq '.parts.yq.source-tag' snap/snapcraft.yaml) + +if [ "$actualSnapVersion" != "$version" ]; then + echo "Failed to update snapcraft" + exit 1 +else + echo "snapcraft updated" +fi + git add cmd/version.go snap/snapcraft.yaml git commit -m 'Bumping version' git tag $version diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index d2ca0721..fb34d648 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -3,17 +3,26 @@ version: 'v4.40.5' summary: A lightweight and portable command-line data file processor description: | `yq` uses [jq](https://github.com/stedolan/jq) like syntax but works with yaml, json, xml, csv, properties and TOML files. -base: core18 +base: core22 grade: stable # devel|stable. must be 'stable' to release into candidate/stable channels confinement: strict + +architectures: + - build-on: s390x + - build-on: ppc64el + - build-on: arm64 + - build-on: armhf + - build-on: amd64 + - build-on: i386 + apps: yq: - command: yq + command: bin/yq plugs: [home, removable-media] parts: yq: plugin: go - go-channel: 1.20/stable - source: . - source-type: git - go-importpath: github.com/mikefarah/yq + source: https://github.com/mikefarah/yq.git + source-tag: v4.40.5 + build-snaps: + - go/latest/stable \ No newline at end of file