Files
mcr/Makefile
Kyle Isom d5580f01f2 Migrate module path from kyle/ to mc/ org
All import paths updated to git.wntrmute.dev/mc/. Bumps mcdsl to v1.2.0.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-27 02:05:59 -07:00

47 lines
1.1 KiB
Makefile

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