fix(release): also upload releases/updates.json during release:push

This commit is contained in:
Jordan Wages 2025-08-22 23:46:18 -05:00
commit d68603eb5e

View file

@ -113,5 +113,22 @@ for (const file of files) {
run(cmd, [user, pass]);
}
console.log('Upload complete.');
// Also upload updates.json (self-hosted updates manifest) alongside artifacts
const updatesPath = path.join(root, 'releases', 'updates.json');
if (fs.existsSync(updatesPath)) {
const updatesUrl = `${baseUrl}/updates.json`;
console.log(`Uploading updates.json to ${updatesUrl}`);
const cmd = [
'curl',
'--fail',
'--ftp-create-dirs',
`--user`, `${user}:${pass}`,
'--upload-file', JSON.stringify(updatesPath),
JSON.stringify(updatesUrl),
].join(' ');
run(cmd, [user, pass]);
} else {
console.warn('Warning: releases/updates.json not found; skipping upload.');
}
console.log('Upload complete.');