Files
secret/Makefile
T
clawbot 00713b8677
check / check (push) Failing after 3s
Build with the local docker daemon; add script/build (closes #44)
The Makefile exported DOCKER_HOST pointing at one private machine, so
every docker call made through make, `make lint` and `make check`
included, failed everywhere else. The line is gone: docker uses the
local daemon, or a DOCKER_HOST set in the environment.

`make build` now calls the new `script/build`, which stamps the version
and commit as the Makefile did. A VERSION set in the environment now
wins over `git describe`, not only one given as `make build VERSION=x`.
build, clean, install and docker-run are phony; install depends on
build. The vet target is removed: `script/test` runs `go vet` first.

Model: opus-5-5
2026-10-04 10:42:09 +02:00

50 lines
694 B
Makefile

export CGO_ENABLED=1
.PHONY: default bootstrap setup build test lint fmt fmt-check check docker \
docker-run clean install hooks
default: check
bootstrap:
@script/bootstrap
setup:
@script/setup
# Build ./secret; `make build VERSION=x` stamps x instead of `git describe`
build:
@script/build
test:
@script/test
fmt:
@script/fmt
lint:
@script/lint
check:
@script/check
# Build Docker container
docker:
@script/docker
# Run Docker container interactively
docker-run:
docker run --rm -it "$$(./script/projectname)"
# Clean build artifacts
clean:
rm -f ./secret
install: build
cp ./secret $(HOME)/bin/secret
fmt-check:
@script/fmt-check
hooks:
@script/install-precommit