Skip to content
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
1 change: 1 addition & 0 deletions .build-trigger.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

28 changes: 28 additions & 0 deletions .github/workflows/test-snap-can-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: 🧪 Snap Builds

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
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,9 @@ brew install nap
# Arch
yay -S nap

# Snap
sudo snap install nap-snippets

# Nix
nix-env -iA nixpkgs.nap
```
Expand Down
37 changes: 29 additions & 8 deletions snap/snapcraft.yaml
Original file line number Diff line number Diff line change
@@ -1,32 +1,53 @@
name: nap
adopt-info: nap
name: nap-snippets
adopt-info: nap-snippets
summary: Nap is a code snippet manager for your terminal.
description: |
Nap is a code snippet manager for your terminal. Create and access new snippets quickly with
the command-line interface or browse, manage, and organize them with the text-user interface.
Keep your code snippets safe, sound, and well-rested in your terminal.

To learn more, visit: https://github.com/maaslalani/nap
To learn more, visit: https://github.com/maaslalani/nap

base: core20
base: core24
grade: stable
confinement: strict
compression: lzo
license: MIT
source-code: https://github.com/maaslalani/nap
issues: https://github.com/kz6fittycent/nap/issues
contact: https://github.com/kz6fittycent/nap

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:
nap:
nap-snippets:
command: bin/nap
plugs:
- home

parts:
nap:
nap-snippets:
source: https://github.com/maaslalani/nap
source-type: git
plugin: go
build-snaps:
- go

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