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).
This commit is contained in:
John O'Keefe
2026-09-15 22:29:13 -04:00
parent 4c34a57493
commit ba2b49bedd
2 changed files with 9 additions and 4 deletions
+6 -1
View File
@@ -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 && \
+3 -3
View File
@@ -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: