chore(release): point updater feed at updates.mailib.ru (v1.0.16)
Set build.publish.url to the production HTTPS feed, bump version to 1.0.16, add publish-to-updates.ps1 for VPS upload, and normalize Linux AppImage names from x86_64 to x64 after pack:linux. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -6,6 +6,8 @@
|
||||
* the AppImage. Build from Linux/WSL instead.
|
||||
*/
|
||||
import { spawnSync } from 'node:child_process';
|
||||
import fs from 'node:fs';
|
||||
import path from 'node:path';
|
||||
import process from 'node:process';
|
||||
|
||||
function run(command, args) {
|
||||
@@ -19,6 +21,33 @@ function run(command, args) {
|
||||
}
|
||||
}
|
||||
|
||||
/** electron-builder для AppImage x64 часто даёт `x86_64` в имени — выравниваем под feed. */
|
||||
function normalizeLinuxReleaseNames() {
|
||||
const releaseDir = path.resolve('release');
|
||||
if (!fs.existsSync(releaseDir)) return;
|
||||
|
||||
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)}`);
|
||||
}
|
||||
}
|
||||
|
||||
for (const ymlName of fs.readdirSync(releaseDir)) {
|
||||
if (!ymlName.startsWith('latest-linux') || !ymlName.endsWith('.yml')) continue;
|
||||
const ymlPath = path.join(releaseDir, ymlName);
|
||||
const text = fs.readFileSync(ymlPath, 'utf8');
|
||||
const next = text.replaceAll('x86_64', 'x64');
|
||||
if (next !== text) {
|
||||
fs.writeFileSync(ymlPath, next);
|
||||
console.log(`[pack:linux] patched ${ymlName} (x86_64 -> x64)`);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (process.platform === 'win32') {
|
||||
console.error(
|
||||
[
|
||||
@@ -35,3 +64,4 @@ if (process.platform === 'win32') {
|
||||
|
||||
run('npm', ['run', 'build']);
|
||||
run('electron-builder', ['--linux']);
|
||||
normalizeLinuxReleaseNames();
|
||||
|
||||
Reference in New Issue
Block a user