fix(release): upload Linux AppImage under feed x64 name

Prevent stale TTRPGPlayer-x64.AppImage on the updates host when
electron-builder leaves an x86_64 alias beside an older x64 file.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Ivan Fontosh
2026-08-08 18:47:20 +08:00
parent 1fbaaa6e77
commit 1d94c95cc8
3 changed files with 81 additions and 28 deletions
+9 -4
View File
@@ -34,11 +34,16 @@ function normalizeLinuxReleaseNames() {
for (const name of fs.readdirSync(releaseDir)) {
if (!name.includes('x86_64')) continue;
const from = path.join(releaseDir, name);
const to = path.join(releaseDir, name.replaceAll('x86_64', 'x64'));
if (from !== to && !fs.existsSync(to)) {
fs.renameSync(from, to);
console.log(`[pack:linux] renamed ${name} -> ${path.basename(to)}`);
const toName = name.replaceAll('x86_64', 'x64');
const to = path.join(releaseDir, toName);
if (from === to) continue;
// Always replace stale x64 — otherwise feed points at an old AppImage.
if (fs.existsSync(to)) {
fs.rmSync(to, { force: true });
console.log(`[pack:linux] removed stale ${toName}`);
}
fs.renameSync(from, to);
console.log(`[pack:linux] renamed ${name} -> ${toName}`);
}
for (const ymlName of fs.readdirSync(releaseDir)) {