haunt/Makefile
abs3nt 0e454d971d
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
ci: add site unpacking / packing to makefile, ignore assets directory
2023-03-06 10:39:51 -08:00

42 lines
1.0 KiB
Makefile

pkgname := haunt
build: ${pkgname}
${pkgname}: $(shell find . -name '*.go')
mkdir -p bin
go build -o bin/${pkgname} .
decode:
go run hack/unpack/main.go
pack-site:
go-bindata -pkg haunt -o src/haunt/bindata.go -fs assets/...
completions:
mkdir -p completions
./bin/${pkgname} completion zsh > completions/_${pkgname}
./bin/${pkgname} completion bash > completions/${pkgname}
./bin/${pkgname} completion fish > completions/${pkgname}.fish
run:
go run main.go
tidy:
go mod tidy
clean:
rm -rf bin
rm -rf completions
rm -rf assets
uninstall:
rm -f /usr/bin/${pkgname}
rm -f /usr/share/zsh/site-functions/_${pkgname}
rm -f /usr/share/bash-completion/completions/${pkgname}
rm -f /usr/share/fish/vendor_completions.d/${pkgname}.fish
install:
cp bin/${pkgname} /usr/bin
bin/${pkgname} completion zsh > /usr/share/zsh/site-functions/_${pkgname}
bin/${pkgname} completion bash > /usr/share/bash-completion/completions/${pkgname}
bin/${pkgname} completion fish > /usr/share/fish/vendor_completions.d/${pkgname}.fish