From 5580bf74b0fa854181fb42ce1ee5b6bb2b41cbc3 Mon Sep 17 00:00:00 2001 From: Kyle Isom Date: Fri, 27 Mar 2026 14:32:17 -0700 Subject: [PATCH] Add VERSION variable and push target to Makefile Extract VERSION variable (was inline). Add version tag to docker image. 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 cfa2fd3..ec55fa9 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,8 @@ -.PHONY: build test vet lint proto proto-lint clean docker all devserver +.PHONY: build test vet lint proto proto-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)" mc-proxy: go build $(LDFLAGS) -o mc-proxy ./cmd/mc-proxy @@ -33,7 +35,10 @@ clean: rm -f mc-proxy mcproxyctl docker: - docker build --build-arg VERSION=$(shell git describe --tags --always --dirty) -t mc-proxy -f Dockerfile . + docker build --build-arg VERSION=$(VERSION) -t $(MCR)/mc-proxy:$(VERSION) -f Dockerfile . + +push: docker + docker push $(MCR)/mc-proxy:$(VERSION) devserver: mc-proxy @mkdir -p srv