Skip to content
quarry Artifact [921144e994]
Login

Artifact [921144e994]

Artifact 921144e99483c5d0d20daac39d24df5cd5b3bc92c03d07de0bc04206c3cf4f01:


# Local gates โ€” run before every commit. CI (dagnats, later) runs the same.
.PHONY: check test vet build fixtures fixtures-real spec-lint docs dev

check: vet test build

# Spec correctness gate (0003 ยง2): lint the generated OpenAPI document with
# an off-the-shelf validator. Dev/CI tool only โ€” never a runtime dep.
spec-lint:
	go run ./cmd/quarry spec > /tmp/quarry-spec.json
	go run github.com/daveshanley/[email protected] lint --no-banner --no-style --fail-severity error /tmp/quarry-spec.json

# API reference, generated from the op registry (0003: docs are a phase
# exit criterion). TestDocsCurrent fails the build when this is stale.
docs:
	go run ./cmd/quarry docs > docs/api.md

# Synthetic disposability fixture (fast; the CI corpus).
fixtures:
	fixtures/build-synthetic.sh

# Real corpus (sqlite, tcl) โ€” large clones, opt-in.
fixtures-real:
	fixtures/build-real.sh

test:
	go test ./...

vet:
	go vet ./...

build:
	go build ./...

# Third-party licence inventory served at /licenses.
licenses:
	go run ./cmd/licensegen > internal/legal/licenses.json

# Dev loop: rebuild and restart the server whenever a .go file changes
# (wgo: go install github.com/bokwoon95/wgo@latest). Serve flags come
# from dev.local.mk, which is per-machine and not committed.
-include dev.local.mk
dev:
	wgo run ./cmd/quarry serve $(DEV_ARGS)