- domain: address normalization/parsing, matching with explicit statuses - adapters: SQLite registry store, ArcGIS outages client, optional LLM rewriter, HTTP API - seed pipeline with duplicate handling and unparsed reporting - CLI (seed/verify/resolve), systemd unit, OpenAPI contract, tests
42 lines
883 B
Makefile
42 lines
883 B
Makefile
GO ?= go
|
|
BIN_DIR ?= bin
|
|
|
|
.PHONY: all build test vet fmt tidy run clean seed
|
|
|
|
all: build
|
|
|
|
## build: compile the service and the CLI as static binaries
|
|
build:
|
|
CGO_ENABLED=0 $(GO) build -trimpath -o $(BIN_DIR)/addrkitd ./cmd/addrkitd
|
|
CGO_ENABLED=0 $(GO) build -trimpath -o $(BIN_DIR)/addrkit ./cmd/addrkit
|
|
|
|
## test: run the full test suite with the race detector
|
|
test:
|
|
$(GO) test -race ./...
|
|
|
|
## vet: static analysis
|
|
vet:
|
|
$(GO) vet ./...
|
|
|
|
## fmt: format all Go sources
|
|
fmt:
|
|
gofmt -l -w .
|
|
|
|
## tidy: sync go.mod/go.sum
|
|
tidy:
|
|
$(GO) mod tidy
|
|
|
|
## run: build and start the service with the local config
|
|
run: build
|
|
$(BIN_DIR)/addrkitd -config config.json
|
|
|
|
## seed: build registry.db from a registry dump (override IN=/OUT=)
|
|
IN ?= registry.ndjson
|
|
OUT ?= registry.db
|
|
seed:
|
|
$(BIN_DIR)/addrkit seed -in $(IN) -out $(OUT)
|
|
|
|
## clean: remove build artifacts
|
|
clean:
|
|
rm -rf $(BIN_DIR)
|