check / check (push) Waiting to run
The Go module moves from backend/ to the root (go.mod, go.sum, .golangci.yml, cmd/, internal/), the page's source to web/, and nginx's two files to configs/. backend/ is gone: its LICENSE and .dockerignore are deleted, and its .gitignore entries, README and scripts are folded into the root ones. script/build builds the server binary after the frontend; script/run and script/clean move up from backend/script/; make test, lint, fmt and fmt-check do what the backend's did. Vite's root is web/ and it still builds into dist/. script/bootstrap no longer installs gcc, which only the host Go tests needed. Model: opus-5-5
62 lines
1.2 KiB
Makefile
62 lines
1.2 KiB
Makefile
.PHONY: bootstrap setup dev build run clean test lint fmt fmt-check check \
|
|
add-dependency tidy frontend-viewport-test docker hooks
|
|
|
|
# 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). test, lint, fmt, fmt-check and check cover the whole
|
|
# repo: the frontend in web/ and the Go backend in cmd/ and internal/.
|
|
|
|
bootstrap:
|
|
@script/bootstrap
|
|
|
|
setup:
|
|
@script/setup
|
|
|
|
dev:
|
|
@script/dev
|
|
|
|
# The frontend into dist/ and the netwatch-server binary.
|
|
build:
|
|
@script/build
|
|
|
|
# Builds, then runs netwatch-server on port 8080.
|
|
run:
|
|
@script/run
|
|
|
|
clean:
|
|
@script/clean
|
|
|
|
test:
|
|
@script/test
|
|
|
|
lint:
|
|
@script/lint
|
|
|
|
fmt:
|
|
@script/fmt
|
|
|
|
fmt-check:
|
|
@script/fmt-check
|
|
|
|
check:
|
|
@script/check
|
|
|
|
# make add-dependency PACKAGE=<name>@<version>. PACKAGE reaches the
|
|
# script through the environment, so the shell never reads it as code.
|
|
add-dependency:
|
|
@script/add-dependency "$$PACKAGE"
|
|
|
|
tidy:
|
|
@script/tidy
|
|
|
|
# Responsive-layout verification in a containerised browser. Kept out of
|
|
# check: it takes minutes.
|
|
frontend-viewport-test:
|
|
@script/frontend-viewport-test
|
|
|
|
docker:
|
|
@script/docker
|
|
|
|
hooks:
|
|
@script/install-precommit
|