check / check (push) Successful in 4m51s
The canonical files are fetched whole from sneak/prompts at dd4027b. Kept after the canonical content: the livednstest deny entry in .golangci.yml, /bin in .dockerignore, this repo's own .gitignore lines and a [*.go] tab section in .editorconfig. The workflow keeps its concurrency block and persist-credentials: false. Lint and test are phases of the Dockerfile (golangci-lint v2.14.0; tests on the Debian Go 1.25.7 image as an ordinary user, with the same flags); the build stage depends on both and stamps the version the canonical way. Dockerfile.lint is gone; the prettier stages of Dockerfile.fmt moved into the Dockerfile. Every scripted docker build passes --no-cache; script/cibuild bootstraps, runs script/check, then builds the image. script/fmt-check absorbs fmt-check-go and fmt-check-markdown. Model: opus-5-5
55 lines
1.1 KiB
Makefile
55 lines
1.1 KiB
Makefile
.PHONY: all bootstrap setup build version lint fmt fmt-check test check clean hooks docker
|
|
|
|
BINARY := dnswatcher
|
|
# VERSION given on the command line (`make build VERSION=...`) or in the
|
|
# environment wins over what `git describe` says of this checkout. An
|
|
# empty one counts as not given; `override` is what replaces an empty
|
|
# command-line value.
|
|
ifeq ($(VERSION),)
|
|
override VERSION := $(shell git describe --tags --always --dirty 2>/dev/null || echo "dev")
|
|
endif
|
|
LDFLAGS := -X main.Version=$(VERSION)
|
|
|
|
# Standard targets are thin shims; the implementations live in script/
|
|
# per the scripts-to-rule-them-all pattern (see the Entrypoints section
|
|
# of README.md).
|
|
|
|
all: check build
|
|
|
|
bootstrap:
|
|
@script/bootstrap
|
|
|
|
setup:
|
|
@script/setup
|
|
|
|
build:
|
|
go build -ldflags "$(LDFLAGS)" -o bin/$(BINARY) ./cmd/dnswatcher
|
|
|
|
# Prints the version `make build` stamps.
|
|
version:
|
|
@echo "$(VERSION)"
|
|
|
|
test:
|
|
@script/test
|
|
|
|
lint:
|
|
@script/lint
|
|
|
|
fmt:
|
|
@script/fmt
|
|
|
|
fmt-check:
|
|
@script/fmt-check
|
|
|
|
check:
|
|
@script/check
|
|
|
|
docker:
|
|
@script/docker
|
|
|
|
hooks:
|
|
@script/install-precommit
|
|
|
|
clean:
|
|
rm -rf bin/
|