diff --git a/Makefile b/Makefile index a653aeb..7eea36a 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,8 @@ -.PHONY: build test vet lint proto-lint clean docker all devserver metacrypt metacrypt-web proto binaries +.PHONY: build test vet lint proto-lint clean docker push all devserver metacrypt metacrypt-web proto binaries -LDFLAGS := -trimpath -ldflags="-s -w -X main.version=$(shell git describe --tags --always --dirty 2>/dev/null || echo dev)" +MCR := mcr.svc.mcp.metacircular.net:8443 +VERSION := $(shell git describe --tags --always --dirty 2>/dev/null || echo dev) +LDFLAGS := -trimpath -ldflags="-s -w -X main.version=$(VERSION)" binaries: metacrypt metacrypt-web @@ -38,8 +40,12 @@ clean: rm -f metacrypt metacrypt-web docker: - docker build -t metacrypt -f Dockerfile.api . - docker build -t metacrypt-web -f Dockerfile.web . + docker build --build-arg VERSION=$(VERSION) -t $(MCR)/metacrypt:$(VERSION) -f Dockerfile.api . + docker build --build-arg VERSION=$(VERSION) -t $(MCR)/metacrypt-web:$(VERSION) -f Dockerfile.web . + +push: docker + docker push $(MCR)/metacrypt:$(VERSION) + docker push $(MCR)/metacrypt-web:$(VERSION) docker-compose: docker compose -f deploy/docker/docker-compose.yml up --build