Skip to content

New snap created and needs publication on Snapcraft.io #11

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions .github/workflows/test-snap-can-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: 🧪 Snap Builds

on:
push:
branches: '*'
pull_request:
branches: '*'

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.x]

steps:
- uses: actions/checkout@v4

- uses: snapcore/action-build@v1
id: build

- uses: anchore/scan-action@v6
id: scan

- 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
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# sig

[![ci](https://github.com/ynqa/sig/actions/workflows/ci.yml/badge.svg)](https://github.com/ynqa/sig/actions/workflows/ci.yml)
[![ci](https://github.com/ynqa/sig/actions/workflows/ci.yml/badge.svg)](https://github.com/ynqa/sig/actions/workflows/ci.yml)[![🧪 Snap Builds](https://github.com/ynqa/sig/workflows/%F0%9F%A7%AA%20Snap%20Builds/badge.svg)]

Interactive grep

Expand Down Expand Up @@ -61,6 +61,11 @@ inputs = {
}
```

### Snap [![sig](https://snapcraft.io//sig/badge.svg)](https://snapcraft.io/sig)
```bash
sudo snap install sig
```

Create a shell with it:
```nix
nix shell github:ynqa/sig
Expand Down
66 changes: 66 additions & 0 deletions snap/snapcraft.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: sig
title: sig
summary: Interactive grep
adopt-info: sig
description: |
Interactive grep

Interactive grep (for streaming)

Usage: sig [OPTIONS]

Examples:

$ stern --context kind-kind etcd |& sig
Or the method to retry command by pressing ctrl+r:
$ sig --cmd "stern --context kind-kind etcd"

Archived mode:
$ cat README.md |& sig -a
Or
$ sig -a --cmd "cat README.md"

Options:
--retrieval-timeout <RETRIEVAL_TIMEOUT_MILLIS>
Timeout to read a next line from the stream in milliseconds. [default: 10]
--render-interval <RENDER_INTERVAL_MILLIS>
Interval to render a line in milliseconds. [default: 10]
-q, --queue-capacity <QUEUE_CAPACITY>
Queue capacity to store lines. [default: 1000]
-a, --archived
Archived mode to grep through static data.
-i, --ignore-case
Case insensitive search.
--cmd <CMD>
Command to execute on initial and retries.
-h, --help
Print help (see more with '--help')
-V, --version
Print version

license: MIT
base: core24
grade: stable
confinement: strict
compression: lzo

website: https://github.com/ynqa/sig
contact: https://github.com/ynqa/sig
issues: https://github.com/ynqa/sig/issues
source-code: https://github.com/ynqa/sig


apps:
sig:
command: bin/sig

parts:
sig:
source: https://github.com/ynqa/sig
source-type: git
plugin: rust

override-pull: |
craftctl default
craftctl set version="$(git describe --tags | sed 's/^v//' | cut -d "-" -f1)"