The default VERSION was the date, which parses as version 2026.10.29 and outranks every release, so a make build never saw an update. It's now 'git describe', or "dev". 'make test' runs what CI runs, and CI runs the tests with -race. The CI comment about Forgejo said the opposite of .forgejo/workflows/README.md. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
14 lines
440 B
Makefile
14 lines
440 B
Makefile
# The nearest tag, so self-update can tell a newer release apart; a date
|
|
# would read as version 2026.10.29 and outrank every release.
|
|
VERSION ?= $(shell git describe --tags --always --dirty 2>/dev/null || echo dev)
|
|
|
|
interzone:
|
|
CGO_ENABLED=0 go build -trimpath -ldflags "-s -w -X main.version=$(VERSION)" -o interzone .
|
|
|
|
test:
|
|
test -z "$$(gofmt -l .)" || { gofmt -l .; exit 1; }
|
|
go vet ./...
|
|
go test -race ./...
|
|
|
|
.PHONY: interzone test
|