From 148b5a826d15b12ca83b55ee31862c9260605adb Mon Sep 17 00:00:00 2001 From: Gene Pasquet Date: Mon, 20 Apr 2026 09:54:11 +0100 Subject: Bump version --- Makefile | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 1577aa8..4bd284a 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,9 @@ .DEFAULT_GOAL := engine +# Canonical release string for the tree — keep in sync with downstroke.egg and +# README v… markers (see bump-version). +VERSION := 1.0.0rc1 + # Modules listed in dependency order MODULE_NAMES := entity tween tilemap world input physics renderer assets animation engine mixer sound prefabs scene-loader OBJECT_FILES := $(patsubst %,bin/%.o,$(MODULE_NAMES)) @@ -37,7 +41,7 @@ bin/%.o: %.scm | bin csc -c -J -unit downstroke.$* $*.scm -o bin/$*.o -I bin @if [ -f downstroke.$*.import.scm ]; then mv downstroke.$*.import.scm bin/; fi -.PHONY: clean test engine demos filter format +.PHONY: clean test engine demos filter format bump-version # Reformat every tracked .scm file with Emacs `indent-region` under the user's # real init (so geiser-chicken / scheme-mode rules apply consistently). @@ -87,3 +91,19 @@ demos: engine $(DEMO_BINS) bin/demo-%: demo/%.scm $(OBJECT_FILES) | bin csc demo/$*.scm $(OBJECT_FILES) -o bin/demo-$* -I bin $(USES_FLAGS) -L -lSDL2_mixer + +# Bump VERSION, downstroke.egg, and README v… strings (POSIX sed: write temp, mv). +# NEW must not contain &, backslash, or # (sed replacement / delimiter limits). +bump-version: +ifndef NEW + $(error usage: make bump-version NEW=1.2.3) +endif + @set -e; \ + test "$(VERSION)" != "$(NEW)" || { echo "bump-version: already at $(VERSION)"; exit 0; }; \ + old='$(VERSION)'; new='$(NEW)'; \ + oesc=$$(printf '%s' "$$old" | sed 's/\./\\./g'); \ + t=$$$$.bump; \ + sed "s#^VERSION := $$oesc#VERSION := $$new#" Makefile > "Makefile.$$t" && mv "Makefile.$$t" Makefile; \ + sed "s#((version \"$$oesc\")#((version \"$$new\")#" downstroke.egg > "downstroke.egg.$$t" && mv "downstroke.egg.$$t" downstroke.egg; \ + sed "s#v$$oesc#v$$new#g" README.org > "README.org.$$t" && mv "README.org.$$t" README.org; \ + echo "bump-version: $$old -> $$new (Makefile, downstroke.egg, README.org)" -- cgit v1.2.3