Skip to content

Commit

Permalink
Attempt to use the latest snapcraft build
Browse files Browse the repository at this point in the history
  • Loading branch information
mikefarah committed Feb 2, 2024
1 parent 6183350 commit 2473068
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 7 deletions.
11 changes: 10 additions & 1 deletion scripts/bump-version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand All @@ -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
Expand Down
21 changes: 15 additions & 6 deletions snap/snapcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 2473068

Please sign in to comment.