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>
This commit is contained in:
2026-03-27 14:32:13 -07:00
parent c65ad856a7
commit 2228b27c7c

View File

@@ -1,6 +1,8 @@
.PHONY: build test vet lint clean all devserver
.PHONY: build test vet lint clean docker push all devserver
LDFLAGS := -trimpath -ldflags="-s -w -X main.version=$(shell git describe --tags --always --dirty)"
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
@@ -20,6 +22,12 @@ lint:
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