Configure for goreleaser

This commit is contained in:
2025-01-23 14:03:58 +01:00
parent a72eead432
commit 56adeaf1b8
3 changed files with 52 additions and 9 deletions

View File

@ -1,12 +1,10 @@
BINARY_NAME=qv
LD_FLAGS=-s -w
.PHONY: compile clean
.PHONY: compile compile-snapshot clean
compile:
GOOS=windows GOARCH=amd64 go build -ldflags="$(LD_FLAGS)" -o $(BINARY_NAME)-windows-amd64.exe ./cmd/web/
GOOS=darwin GOARCH=amd64 go build -ldflags="$(LD_FLAGS)" -o $(BINARY_NAME)-darwin-amd64 ./cmd/web/
GOOS=linux GOARCH=amd64 go build -ldflags="$(LD_FLAGS)" -o $(BINARY_NAME)-linux-amd64 ./cmd/web/
@goreleaser release --clean --skip=publish
compile-snapshot:
@goreleaser release --clean --skip=publish
clean:
@rm $(BINARY_NAME)-*-amd64*
@rm -r dist/