From c4d00a11d9c20a438e2ce971a34c74f03f353784 Mon Sep 17 00:00:00 2001 From: Alex Dunmow Date: Thu, 4 Jun 2026 08:49:28 +0800 Subject: [PATCH] build(make): release target + expand SDK_DOWNSTREAM_DIRS - `make release VERSION=vX.Y.Z` checks the tree is clean, pushes HEAD, tags, pushes the tag, then runs update-sdk so every downstream repo's go.mod gets bumped in one shot. - SDK_DOWNSTREAM_DIRS now includes orchestrator/backend and blockninja-themes/* (globbed), which were both missing previously. --- Makefile | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/Makefile b/Makefile index 60d3900..ae2d6f8 100644 --- a/Makefile +++ b/Makefile @@ -3,6 +3,8 @@ SDK_VERSION ?= $(shell git describe --tags --abbrev=0) SDK_DOWNSTREAM_DIRS := \ $(HOME)/src/blockninja/backend \ + $(HOME)/src/orchestrator/backend \ + $(wildcard $(HOME)/src/blockninja-themes/*) \ $(HOME)/src/assumechaos \ $(HOME)/src/bidbuddy \ $(HOME)/src/bidmasters \ @@ -11,6 +13,10 @@ SDK_DOWNSTREAM_DIRS := \ $(HOME)/src/perthplaygrounds \ $(HOME)/src/symposium +.PHONY: install-ninja +install-ninja: + go install ./cmd/ninja + .PHONY: update-sdk update-sdk: @set -e; \ @@ -32,6 +38,20 @@ update-sdk: ); \ done +# Tag + push a new SDK release, then bump the pin in every downstream repo. +# Usage: make release VERSION=v0.11.0 +.PHONY: release +release: + @if [ -z "$(VERSION)" ]; then echo "usage: make release VERSION=vX.Y.Z" >&2; exit 1; fi + @case "$(VERSION)" in v[0-9]*.[0-9]*.[0-9]*) ;; *) echo "VERSION must look like vX.Y.Z (got $(VERSION))" >&2; exit 1 ;; esac + @if ! git diff-index --quiet HEAD --; then echo "working tree dirty; commit before releasing" >&2; exit 1; fi + git push origin HEAD + git tag -a "$(VERSION)" -m "release $(VERSION)" + git push origin "$(VERSION)" + $(MAKE) update-sdk SDK_VERSION=$(VERSION) + @echo "==> $(VERSION) tagged + pushed; downstream go.mod files bumped." + @echo " Review each downstream and commit the pin bump." + .PHONY: check-sdk-pins check-sdk-pins: @set -e; \