Give the front end its version through the build environment
vite.config.js reads RUNESTONE_VERSION and falls back to package.json. The installer build sets RUNESTONE_VERSION and writes all four version files only after the installer exists. Before, it wrote package.json before the build and restored it after a failure. The installation guide and CLAUDE.md now say that setup replaces the installed app in place. The installer no longer shows a maintenance page.
This commit is contained in:
@@ -58,9 +58,9 @@ test('a completed build sets the version fields only after the installer exists'
|
||||
assert.deepEqual(calls.map(({ command, args }) => ({ command, args })),
|
||||
buildCommands(plan, overridePath).map(({ command, args }) => ({ command, args })));
|
||||
for (const call of calls) {
|
||||
// The front end reads package.json. Tauri, Cargo, and the bundler get the version from the override.
|
||||
assert.equal(JSON.parse(call.files[0]).version, next.version);
|
||||
assert.deepEqual(call.files.slice(1), before.slice(1), 'Only package.json changes during the build.');
|
||||
// Tauri, Cargo, and the bundler get the version from the override. The front end gets it from plan.env.
|
||||
assert.deepEqual(call.files, before, 'No version file changes during the build.');
|
||||
assert.deepEqual(plan.env, { RUNESTONE_VERSION: next.version });
|
||||
}
|
||||
assert.equal(installer, path.join(root, 'releases', next.version, `RuneStone_${next.version}_x64-setup.exe`));
|
||||
assert.equal(await readFile(installer, 'utf8'), 'setup');
|
||||
|
||||
Reference in New Issue
Block a user