From ba2b49bedd8cefdcc62c38c967ef62be1bea04a1 Mon Sep 17 00:00:00 2001 From: John O'Keefe Date: Tue, 15 Sep 2026 22:29:13 -0400 Subject: [PATCH] chore(release): bump build/config.yml alongside wails.json make release only bumped wails.json, leaving build/config.yml info.version stale (it sat at 1.6.8 while wails.json moved to 1.99.0). Add a companion python one-liner that rewrites only the indented info.version line - the regex cannot match the top-level schema version 3 - and stage both files into the same bump commit. Marked TEMP until wails.json (v2 leftover) is retired. The companion NOTE in build/config.yml is updated to describe the automation and warn off the schema line. Verified with make -n dry-run and a scratch-copy regex proof (schema line byte-identical, single-line diff). --- Makefile | 7 ++++++- build/config.yml | 6 +++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 352820f..5f118f2 100644 --- a/Makefile +++ b/Makefile @@ -40,7 +40,12 @@ release: @if git rev-parse "$(VERSION)" >/dev/null 2>&1; then echo "Tag $(VERSION) already exists locally — delete it first: git tag -d $(VERSION)"; exit 1; fi @echo "Bumping wails.json to $(VERSION)..." @python3 -c "import json; p='wails.json'; d=json.load(open(p)); d['info']['productVersion']='$(VERSION)'; json.dump(d, open(p,'w'), indent=2); open(p,'a').write('\n')" - @git add wails.json + # TEMP until wails.json (v2 leftover) is retired: bump build/config.yml too. + # The regex targets only the indented info.version line, never the + # top-level schema `version: '3'`. + @echo "Bumping build/config.yml to $(VERSION)..." + @python3 -c "import re; p='build/config.yml'; s=open(p).read(); s2=re.sub(r'^ version: \"[^\"]*\"', ' version: \"$(VERSION)\"', s, count=1, flags=re.M); assert s2 != s, 'info.version not found'; open(p,'w').write(s2)" + @git add wails.json build/config.yml @git commit -m "chore(release): bump version to $(VERSION)" @echo "Generating release notes for $(VERSION)..." @git tag "$(VERSION)" HEAD && \ diff --git a/build/config.yml b/build/config.yml index 108d56d..b141359 100644 --- a/build/config.yml +++ b/build/config.yml @@ -1,7 +1,7 @@ # Wails v3 project configuration. -# NOTE: `info.version` is informational only. The release flow (`./release`, -# `make release`) bumps `wails.json` -> info.productVersion and does NOT touch -# this file, so bump both together when cutting a release. +# NOTE: `make release` bumps `info.version` below alongside wails.json. +# Never touch the top-level `version: '3'` — that is the config file schema, +# not the app version. version: '3' info: