Skip to content

Commit

Permalink
Add powershell completion, setup profile in scoop package to enable c…
Browse files Browse the repository at this point in the history
…ompletion.
  • Loading branch information
hilli committed Feb 25, 2024
1 parent 88b4848 commit bf327d4
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ before:
- go mod tidy
# you may remove this if you don't need go generate
# - go generate ./...
- /bin/sh -c "set -e; mkdir -p completions; go run cmd/kefw2/kefw2.go completion bash > completions/kefw2.bash; go run cmd/kefw2/kefw2.go completion zsh > completions/kefw2.zsh; go run cmd/kefw2/kefw2.go completion fish > completions/kefw2.fish"
- /bin/sh -c "set -e; mkdir -p completions; go run cmd/kefw2/kefw2.go completion bash > completions/kefw2.bash; go run cmd/kefw2/kefw2.go completion zsh > completions/kefw2.zsh; go run cmd/kefw2/kefw2.go completion fish > completions/kefw2.fish; go run cmd/kefw2/kefw2.go completion powershell > completions/kefw2.ps1"

builds:
- id: kefw2
Expand Down Expand Up @@ -92,6 +92,11 @@ scoops:
homepage: https://github.com/hilli/go-kef-w2
description: Command for handling KEF W2 platform speakers (LSX Wireless II (LT)/LS50 Wireless II/LS60 Wireless)
license: MIT
post_install:
- Write-Host 'Running postinstall command'
- if(!(Test-Path $PROFILE.CurrentUserCurrentHost -PathType Leaf)) { New-Item -Path $PROFILE.CurrentUserCurrentHost -ItemType file -Force }
- $scoopPrefix = $(scoop prefix go-kef-w2)
- Add-Content -Path $PROFILE.CurrentUserCurrentHost -Value . "$scoopPrefix\completions\kefw2.ps1"

nfpms:
- file_name_template: "{{ .ConventionalFileName }}"
Expand Down

0 comments on commit bf327d4

Please sign in to comment.