fix(release): also upload releases/updates.json during release:push
This commit is contained in:
parent
a099823880
commit
d68603eb5e
1 changed files with 18 additions and 1 deletions
|
|
@ -113,5 +113,22 @@ for (const file of files) {
|
||||||
run(cmd, [user, pass]);
|
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.');
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue