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:
@@ -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)) {
|
||||
|
||||
Reference in New Issue
Block a user