From d4d65eb52276b2d51c5a0b3d6387c61245cc7895 Mon Sep 17 00:00:00 2001 From: Kyle Isom Date: Fri, 27 Mar 2026 14:31:57 -0700 Subject: [PATCH] Standardize Makefile docker/push targets for MCR Add MCR and VERSION variables. Tag images with full MCR registry URL and version. Add push target that builds then pushes to MCR. Co-Authored-By: Claude Opus 4.6 (1M context) --- Makefile | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 5775204..983bfef 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,8 @@ -.PHONY: build test vet lint clean docker 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)" mcdoc: CGO_ENABLED=0 go build $(LDFLAGS) -o mcdoc ./cmd/mcdoc @@ -21,7 +23,10 @@ clean: rm -f mcdoc docker: - docker build --build-arg VERSION=$(shell git describe --tags --always --dirty) -t mcdoc -f Dockerfile . + docker build --build-arg VERSION=$(VERSION) -t $(MCR)/mcdoc:$(VERSION) -f Dockerfile . + +push: docker + docker push $(MCR)/mcdoc:$(VERSION) devserver: mcdoc @mkdir -p srv