From e9e6f4f35c1c254b2241fd12ca126d7baae88a37 Mon Sep 17 00:00:00 2001 From: Chris Knight Date: Sat, 22 Aug 2026 09:13:22 -0400 Subject: [PATCH] Prepare 0.7.0: bump versions and stop DEFAULT_WSM_VERSION rotting WSM 0.6.4 -> 0.7.0 across AssemblyInfo.cs, Headless.csproj, and the Vortex extension's DEFAULT_WSM_VERSION. Extension 0.1.0 -> 0.2.0, which tracks separately. 0.7.0 rather than 0.6.5, deliberately: Vortex's bundled game-witcher3 extension auto-installs the IDCs fork with RELEASE_CUTOFF = '0.6.5', MD5-pinned, using the same WitcherScriptMerger.exe name and the same W3ScriptMerger tool id. Releasing our own 0.6.5 would collide with that in a way that is confusing to diagnose and impossible to fix after the fact. Skipping the number sidesteps it entirely. release.yml's verify-version already checked AssemblyInfo.cs, Headless.csproj and the tag against each other. It did not check DEFAULT_WSM_VERSION - the fourth copy of the same number and the only one nothing enforced, which is why it was still pinned to 0.6.4 while main moved on. That constant selects which release the Vortex extension downloads when a user acquires WSM through it, so leaving it behind ships an extension that auto-fetches the PREVIOUS build: every new user would get exactly the build missing the fixes the release was cut for. Now checked and fails loudly. Also corrects a comment in githubRelease.ts that justified downloading the Headless host by saying the WinForms host's `merge` *and* `mcp` verbs both gate on the combined QuickBMS+wcc_lite check. That stopped being true for `merge` when its gate was narrowed to the text-merge engine. `mcp` still gates on the combined check, and MCP is how this extension actually drives WSM, so the conclusion is unchanged - the comment just needed to stop asserting something false. Verified: Release build clean, 216 .NET tests, 225 extension tests, typecheck and lint clean, `--version` prints 0.7.0, and `npm run package` produces witcherscriptmerger-vortex-0.2.0.zip. Co-Authored-By: Claude Opus 5 (1M context) Claude-Session: https://claude.ai/code/session_01FP8H6rBLCGPBFRSVsF3Kgw --- .github/workflows/release.yml | 17 ++++++++++++++ .../WitcherScriptMerger.Headless.csproj | 2 +- .../Properties/AssemblyInfo.cs | 4 ++-- vortex-extension/info.json | 2 +- vortex-extension/package-lock.json | 4 ++-- vortex-extension/package.json | 2 +- vortex-extension/src/githubRelease.ts | 22 ++++++++++++------- 7 files changed, 38 insertions(+), 15 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 17ffe6f..9c9c085 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -63,6 +63,23 @@ jobs: throw "Tag '$env:GITHUB_REF_NAME' (version '$tagVersion') does not match WitcherScriptMerger/Properties/AssemblyInfo.cs's AssemblyVersion ('$assemblyVersion'). Bump AssemblyVersion/AssemblyFileVersion there (and WitcherScriptMerger.Headless.csproj's ) before tagging a release." } + # Fourth copy of the same number, and the one that silently rots: the Vortex + # extension downloads WitcherScriptMerger.Headless--win-x64.zip + # when a user acquires WSM through it. Nothing checked it before, so shipping a + # release without bumping it meant every new extension user auto-downloaded the + # PREVIOUS build - i.e. one missing exactly the fixes the release was cut for. + # It is not part of the extension's own version, which tracks separately. + $extMatch = Select-String -Path 'vortex-extension/src/githubRelease.ts' ` + -Pattern "^export const DEFAULT_WSM_VERSION = '([^']+)';" | Select-Object -First 1 + if (-not $extMatch) { + throw "Could not find DEFAULT_WSM_VERSION in vortex-extension/src/githubRelease.ts" + } + $extVersion = $extMatch.Matches[0].Groups[1].Value + + if ($extVersion -ne $assemblyVersion) { + throw "vortex-extension/src/githubRelease.ts's DEFAULT_WSM_VERSION ('$extVersion') does not match AssemblyVersion ('$assemblyVersion'). That constant selects which WSM release the Vortex extension downloads, so leaving it behind ships an extension that fetches the wrong build." + } + "version=$assemblyVersion" | Out-File -FilePath $env:GITHUB_OUTPUT -Append -Encoding utf8 # build.yml (dotnet build + dotnet format whitespace --verify-no-changes) only runs on diff --git a/WitcherScriptMerger.Headless/WitcherScriptMerger.Headless.csproj b/WitcherScriptMerger.Headless/WitcherScriptMerger.Headless.csproj index 1582d25..2097e22 100644 --- a/WitcherScriptMerger.Headless/WitcherScriptMerger.Headless.csproj +++ b/WitcherScriptMerger.Headless/WitcherScriptMerger.Headless.csproj @@ -10,7 +10,7 @@ GenerateAssemblyInfo=false (see its CLAUDE.md), so it can't pick up this property; this one has no such override, so GenerateAssemblyInfo (default true) stamps AssemblyVersion/AssemblyFileVersion/AssemblyInformationalVersion from it. --> - 0.6.4 + 0.7.0