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.
This commit is contained in:
parent
7615bd92ca
commit
c4d00a11d9
20
Makefile
20
Makefile
@ -3,6 +3,8 @@ SDK_VERSION ?= $(shell git describe --tags --abbrev=0)
|
|||||||
|
|
||||||
SDK_DOWNSTREAM_DIRS := \
|
SDK_DOWNSTREAM_DIRS := \
|
||||||
$(HOME)/src/blockninja/backend \
|
$(HOME)/src/blockninja/backend \
|
||||||
|
$(HOME)/src/orchestrator/backend \
|
||||||
|
$(wildcard $(HOME)/src/blockninja-themes/*) \
|
||||||
$(HOME)/src/assumechaos \
|
$(HOME)/src/assumechaos \
|
||||||
$(HOME)/src/bidbuddy \
|
$(HOME)/src/bidbuddy \
|
||||||
$(HOME)/src/bidmasters \
|
$(HOME)/src/bidmasters \
|
||||||
@ -11,6 +13,10 @@ SDK_DOWNSTREAM_DIRS := \
|
|||||||
$(HOME)/src/perthplaygrounds \
|
$(HOME)/src/perthplaygrounds \
|
||||||
$(HOME)/src/symposium
|
$(HOME)/src/symposium
|
||||||
|
|
||||||
|
.PHONY: install-ninja
|
||||||
|
install-ninja:
|
||||||
|
go install ./cmd/ninja
|
||||||
|
|
||||||
.PHONY: update-sdk
|
.PHONY: update-sdk
|
||||||
update-sdk:
|
update-sdk:
|
||||||
@set -e; \
|
@set -e; \
|
||||||
@ -32,6 +38,20 @@ update-sdk:
|
|||||||
); \
|
); \
|
||||||
done
|
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
|
.PHONY: check-sdk-pins
|
||||||
check-sdk-pins:
|
check-sdk-pins:
|
||||||
@set -e; \
|
@set -e; \
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user