check / check (push) Failing after 7s
The shared files are fetched from sneak/prompts dd4027b, with this repository's own entries after the shared content in .gitignore, .editorconfig and .dockerignore. Lint and tests are Dockerfile phases (golangci-lint v2.14.0, Debian Go 1.24.13) that the build stage depends on, and the Makefile targets call the script/ entrypoints. make fmt also formats Markdown with prettier. Fixes for the new lint findings: the auth cookie is always Secure, an IRC connection's relay goroutine stops when the connection closes, and repeated strings are constants. Model: opus-5-5
62 lines
1.3 KiB
Makefile
62 lines
1.3 KiB
Makefile
.PHONY: all bootstrap setup build lint fmt fmt-check test check clean run debug docker hooks ensure-web-dist
|
|
|
|
BINARY := neoircd
|
|
VERSION := $(shell git describe --tags --always --dirty 2>/dev/null || echo "dev")
|
|
LDFLAGS := -X main.Version=$(VERSION)
|
|
|
|
# The 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
|
|
|
|
# ensure-web-dist creates placeholder files so //go:embed dist/* in
|
|
# web/embed.go resolves without a full Node.js build. The real SPA is
|
|
# built by the web-builder Docker stage; these placeholders let
|
|
# "make build" work outside Docker.
|
|
ensure-web-dist:
|
|
@if [ ! -d web/dist ]; then \
|
|
mkdir -p web/dist && \
|
|
touch web/dist/index.html web/dist/style.css web/dist/app.js && \
|
|
echo "==> Created placeholder web/dist/ for go:embed"; \
|
|
fi
|
|
|
|
build: ensure-web-dist
|
|
go build -ldflags "$(LDFLAGS)" -o bin/$(BINARY) ./cmd/neoircd
|
|
|
|
test:
|
|
@script/test
|
|
|
|
lint:
|
|
@script/lint
|
|
|
|
fmt:
|
|
@script/fmt
|
|
|
|
fmt-check:
|
|
@script/fmt-check
|
|
|
|
check:
|
|
@script/check
|
|
|
|
run: build
|
|
./bin/$(BINARY)
|
|
|
|
debug: build
|
|
DEBUG=1 GOTRACEBACK=all ./bin/$(BINARY)
|
|
|
|
clean:
|
|
rm -rf bin/ neoircd
|
|
|
|
docker:
|
|
@script/docker
|
|
|
|
hooks:
|
|
@script/install-precommit
|