diff --git a/.github/workflows/test-snap-can-build.yml b/.github/workflows/test-snap-can-build.yml new file mode 100644 index 0000000..c9a6b09 --- /dev/null +++ b/.github/workflows/test-snap-can-build.yml @@ -0,0 +1,28 @@ +name: 🧪 Test snap can be built on x86_64 + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + node-version: [20.x] + + steps: + - uses: actions/checkout@v2 + + - uses: snapcore/action-build@v1 + id: build + + - uses: diddlesnaps/snapcraft-review-action@v1 + with: + snap: ${{ steps.build.outputs.snap }} + isClassic: 'false' + # Plugs and Slots declarations to override default denial (requires store assertion to publish) + # plugs: ./plug-declaration.json + # slots: ./slot-declaration.json diff --git a/README.md b/README.md index 4591a48..84adf5f 100644 --- a/README.md +++ b/README.md @@ -26,6 +26,13 @@ Available through the Arch User Repository as [jqp-bin](https://aur.archlinux.or yay -S jqp-bin ``` +### Snap install +Snap Status + +``` +sudo snap install jqp +``` + ### GitHub releases Download the relevant asset for your operating system from the latest GitHub release. Unpack it, then move the binary to somewhere accessible in your `PATH`, e.g. `mv ./jqp /usr/local/bin`. diff --git a/snap/local/jqp.png b/snap/local/jqp.png new file mode 100644 index 0000000..75accdb Binary files /dev/null and b/snap/local/jqp.png differ diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml new file mode 100644 index 0000000..69ee8dd --- /dev/null +++ b/snap/snapcraft.yaml @@ -0,0 +1,69 @@ +name: jqp +adopt-info: jqp +summary: jqp is a TUI for exploring the jq command line utility +description: | + jqp is a terminal user interface (TUI) for exploring the jq command line utility. + + You can use it to run jq queries interactively. If no query is provided, the interface will prompt + you for one. + + The command accepts an optional query argument which will be executed against the input JSON or + newline-delimited JSON (NDJSON). + + You can provide the input JSON or NDJSON either through a file or via standard input (stdin). + + Usage: + jqp [query] [flags] + + Flags: + --config string path to config file (default is $HOME/.jqp.yaml) + -f, --file string path to the input JSON file + -h, --help help for jqp + -t, --theme string jqp theme + -v, --version version for jqp + +license: MIT +issues: https://github.com/kz6fittycent/jqp +contact: https://github.com/kz6fittycent/jqp +source-code: https://github.com/noahgorstein/jqp +icon: snap/local/jqp.png + +base: core24 +grade: stable +confinement: strict +compression: lzo + +platforms: + amd64: + build-on: [amd64] + build-for: [amd64] + arm64: + build-on: [arm64] + build-for: [arm64] + armhf: + build-on: [armhf] + build-for: [armhf] + ppc64el: + build-on: [ppc64el] + build-for: [ppc64el] + s390x: + build-on: [s390x] + build-for: [s390x] + +apps: + jqp: + command: bin/jqp + plugs: + - home + +parts: + jqp: + source: https://github.com/noahgorstein/jqp + source-type: git + plugin: go + build-snaps: + - go + + override-pull: | + craftctl default + craftctl set version="$(git describe --tags | sed 's/^v//' | cut -d "-" -f1)"