Adopt scripts-to-rule-them-all: script/ entrypoints, Makefile shims

This commit is contained in:
2026-07-07 01:54:40 +02:00
parent 6cb690bfb7
commit 5cb4f827d2
16 changed files with 277 additions and 14 deletions

View File

@@ -1,28 +1,30 @@
.PHONY: test fmt fmt-check lint check docker hooks
.PHONY: bootstrap setup test fmt fmt-check lint check docker hooks
default: check
bootstrap:
@script/bootstrap
setup:
@script/setup
test:
@go test -v ./...
@script/test
fmt:
goimports -l -w .
golangci-lint run --fix
@script/fmt
fmt-check:
@test -z "$$(gofmt -l .)" || { echo "gofmt would reformat:"; gofmt -l .; exit 1; }
@script/fmt-check
lint:
golangci-lint run
@script/lint
check: fmt-check lint test
check:
@script/check
docker:
docker build --progress plain .
@script/docker
hooks:
@echo "Installing git hooks..."
@mkdir -p .git/hooks
@printf '#!/bin/sh\nmake check\n' > .git/hooks/pre-commit
@chmod +x .git/hooks/pre-commit
@echo "Pre-commit hook installed."
@script/install-precommit