mirror of
https://gitlab.com/vyla-entertainment/home.git
synced 2026-11-19 16:47:21 -05:00
clean old nsis bundles and strictly match installer version to prevent uploading outdated exe
This commit is contained in:
10
release.js
10
release.js
@@ -158,13 +158,21 @@ async function main() {
|
|||||||
|
|
||||||
await ensureWebView2Loader();
|
await ensureWebView2Loader();
|
||||||
|
|
||||||
|
const bundleDir = path.join(__dirname, 'src-tauri', 'target', 'release', 'bundle');
|
||||||
|
if (fs.existsSync(bundleDir)) {
|
||||||
|
fs.rmSync(bundleDir, { recursive: true, force: true });
|
||||||
|
}
|
||||||
|
|
||||||
|
console.log('Compiling Windows Tauri installer locally...');
|
||||||
execSync('npm run build', {
|
execSync('npm run build', {
|
||||||
stdio: 'inherit'
|
stdio: 'inherit'
|
||||||
});
|
});
|
||||||
|
|
||||||
const nsisDir = path.join(__dirname, 'src-tauri/target/release/bundle/nsis');
|
const nsisDir = path.join(__dirname, 'src-tauri/target/release/bundle/nsis');
|
||||||
if (fs.existsSync(nsisDir)) {
|
if (fs.existsSync(nsisDir)) {
|
||||||
const files = fs.readdirSync(nsisDir).filter(f => f.endsWith('.exe'));
|
const targetVersion = version.startsWith('v') ? version.substring(1) : version;
|
||||||
|
const files = fs.readdirSync(nsisDir).filter(f => f.endsWith('.exe') && f.includes(targetVersion));
|
||||||
|
|
||||||
if (files.length > 0) {
|
if (files.length > 0) {
|
||||||
const originalName = files[0];
|
const originalName = files[0];
|
||||||
installerPath = path.join(nsisDir, originalName);
|
installerPath = path.join(nsisDir, originalName);
|
||||||
|
|||||||
Reference in New Issue
Block a user