Makefile: thin shims only, add make build (closes #73)
check / check (push) Failing after 2s
check / check (push) Failing after 2s
The Makefile is now one shim per script/ entrypoint, in the order of the canonical model Makefile, plus build, generate and fuzz. The new script/build writes bin/mfer with the urfave_cli_no_docs tag and the git describe revision that script/docker stamps. script/generate now adds the Go bin directory to PATH itself, and the Docker lint stage calls script/gofumpt --check directly. Removed: the tarball-caching rules and their ignore entries, godoc, ci, fixme, clean, run, default, fmt-check-go, fmt-check-md, and bin/gitrev.sh, which only the Makefile called. Model: opus-5-5
This commit was merged in pull request #152.
This commit is contained in:
Executable
+20
@@ -0,0 +1,20 @@
|
||||
#!/bin/sh
|
||||
# script/build: build the mfer binary into bin/mfer, stamped with the
|
||||
# revision `mfer version` prints, derived as script/docker derives it.
|
||||
set -eu
|
||||
|
||||
ROOT="$(cd "$(dirname "$0")/.." && pwd -P)"
|
||||
|
||||
main() {
|
||||
cd "$ROOT"
|
||||
# Own line: a failing command substitution inside an argument does
|
||||
# not trip `set -e`, so the inline form degrades silently to an
|
||||
# empty constant.
|
||||
version="$(git describe --tags --always --dirty 2>/dev/null || true)"
|
||||
[ -n "$version" ] || version="unknown"
|
||||
go build -tags urfave_cli_no_docs \
|
||||
-ldflags "-X main.Gitrev=$version" \
|
||||
-o bin/mfer ./cmd/mfer
|
||||
}
|
||||
|
||||
main "$@"
|
||||
Reference in New Issue
Block a user