فینورا پرو - سامانه جامع حسابداری و صدور فاکتور

test(windows-vm): bump version only inside ephemeral build to exercise real NSIS upgrade

davoodmehraban89 committed Oct 16, 2026 at 17:59 UTC 1b7df3c05277c0a2f5168da0d501af9e2c72383e
1 file changed +22
scripts/windows-vm-set-candidate.cjs new
+22
@@ -0,0 +1,22 @@
1 +'use strict';
2 +// The candidate is built only in the disposable CI workspace.
3 +// Never commit or publish this version number as a production release.
4 +const fs = require('node:fs');
5 +const path = require('node:path');
6 +const packagePath = path.resolve('package.json');
7 +const tauriPath = path.resolve('src-tauri/tauri.conf.json');
8 +const pkg = JSON.parse(fs.readFileSync(packagePath, 'utf8'));
9 +const tauri = JSON.parse(fs.readFileSync(tauriPath, 'utf8'));
10 +if (pkg.version !== tauri.version) throw Error('Package and Tauri versions disagree');
11 +const found = /^(\d+)\.(\d+)\.(\d+)$/.exec(pkg.version);
12 +if (!found) throw Error('Expected stable semantic version in package manifest');
13 +const version = found[1] + '.' + found[2] + '.' + (Number(found[3]) + 1);
14 +if (version === '2.0.3') throw Error('Candidate must differ from published 2.0.3');
15 +pkg.version = version;
16 +tauri.version = version;
17 +fs.writeFileSync(packagePath, JSON.stringify(pkg, null, 2) + '\n');
18 +fs.writeFileSync(tauriPath, JSON.stringify(tauri, null, 2) + '\n');
19 +if (process.env.GITHUB_OUTPUT) {
20 + fs.appendFileSync(process.env.GITHUB_OUTPUT, 'version=' + version + '\n');
21 +}
22 +console.log('CI-only Windows NSIS test candidate:', version);