diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 97cb5b3..c224cbb 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -19,7 +19,8 @@ jobs: uses: actions/setup-go@v3 with: go-version: '>=1.19.0' - - name: Tests + - + name: Tests run: go test -v ./... - name: Run GoReleaser @@ -30,3 +31,4 @@ jobs: args: release --rm-dist env: GITHUB_TOKEN: ${{ secrets.GORELEASER_GITHUB_TOKEN }} + AUR_KEY: ${{ secrets.AUR_KEY }} \ No newline at end of file diff --git a/.goreleaser.yml b/.goreleaser.yml index ed87d78..925203c 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -11,6 +11,7 @@ builds: - amd64 - arm - arm64 + brews: - tap: owner: mazzz1y @@ -34,3 +35,15 @@ nfpms: - deb - rpm bindir: /usr/bin + +aurs: + - name: mcli-bin + homepage: "https://github.com/mazzz1y/mcli" + description: "Simple shortcut menu for shell commands." + maintainers: + - 'Dmitry Rubtsov ' + license: "MIT" + private_key: '{{ .Env.AUR_KEY }}' + git_url: 'ssh://aur@aur.archlinux.org/mcli-bin.git' + provides: + - mcli \ No newline at end of file diff --git a/pkg/shortcuts/shortcuts.go b/pkg/shortcuts/shortcuts.go index d05c65f..4d275bf 100644 --- a/pkg/shortcuts/shortcuts.go +++ b/pkg/shortcuts/shortcuts.go @@ -17,9 +17,9 @@ func (ss *Shortcuts) Add(s Shortcut) { ss.sort() } -func (ss *Shortcuts) Delete(i Shortcut) { +func (ss *Shortcuts) Delete(s Shortcut) { a := *ss - a[i.Index] = a[len(a)-1] + a[s.Index] = a[len(a)-1] *ss = a[:len(a)-1] ss.sort() }