Files
mcat/Makefile
Kyle Isom 2228b27c7c Add Makefile docker/push targets for MCR
Add MCR and VERSION variables, docker target to build the container
image with MCR tagging, and push target to push to MCR.

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

35 lines
626 B
Makefile

.PHONY: build test vet 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)"
mcat:
go build $(LDFLAGS) -o mcat ./cmd/mcat
build:
go build ./...
test:
go test ./...
vet:
go vet ./...
lint:
golangci-lint run ./...
clean:
rm -f mcat
docker:
docker build --build-arg VERSION=$(VERSION) -t $(MCR)/mcat:$(VERSION) -f deploy/Dockerfile .
push: docker
docker push $(MCR)/mcat:$(VERSION)
all: vet lint test mcat
devserver: mcat
./mcat server --config srv/mcat.toml