.PHONY: build test vet lint proto proto-lint clean docker push all devserver MCR := mcr.svc.mcp.metacircular.net:8443 VERSION := $(shell git describe --tags --always --dirty) LDFLAGS := -trimpath -ldflags="-s -w -X main.version=$(VERSION)" mcns: CGO_ENABLED=0 go build $(LDFLAGS) -o mcns ./cmd/mcns build: go build ./... test: go test ./... vet: go vet ./... lint: golangci-lint run ./... proto: protoc --go_out=. --go_opt=module=git.wntrmute.dev/mc/mcns \ --go-grpc_out=. --go-grpc_opt=module=git.wntrmute.dev/mc/mcns \ proto/mcns/v1/*.proto proto-lint: buf lint buf breaking --against '.git#branch=master,subdir=proto' clean: rm -f mcns docker: docker build --build-arg VERSION=$(VERSION) -t $(MCR)/mcns:$(VERSION) -f Dockerfile . push: docker docker push $(MCR)/mcns:$(VERSION) devserver: mcns @mkdir -p srv @if [ ! -f srv/mcns.toml ]; then cp deploy/examples/mcns.toml srv/mcns.toml; echo "Created srv/mcns.toml from example — edit before running."; fi ./mcns server --config srv/mcns.toml all: vet lint test mcns