mirror of
https://gitlab.com/vyla-entertainment/home.git
synced 2026-11-14 22:27:20 -05:00
refactor: move component archives to GitLab Package Registry and keep release assets minimal
This commit is contained in:
21
release.js
21
release.js
@@ -243,6 +243,20 @@ async function main() {
|
||||
console.log('Uploading update-payload.zip...');
|
||||
const payloadUrl = await uploadFileToGitLabPackage(payloadPath, 'vyla-home', version, `update-payload-${timestamp}.zip`);
|
||||
|
||||
const manifestData = JSON.parse(fs.readFileSync(manifestPath, 'utf8'));
|
||||
for (const [name, c] of Object.entries(manifestData.components || {})) {
|
||||
console.log(`Uploading ${c.file}...`);
|
||||
c.url = await uploadFileToGitLabPackage(path.join(__dirname, 'release-assets', c.file), 'vyla-home', version, `${name}-${timestamp}.zip`);
|
||||
}
|
||||
|
||||
const signingKeyPem = process.env.VYLA_UPDATE_SIGNING_KEY;
|
||||
if (!signingKeyPem) {
|
||||
throw new Error('VYLA_UPDATE_SIGNING_KEY is required to sign the update manifest.');
|
||||
}
|
||||
delete manifestData.signature;
|
||||
manifestData.signature = crypto.sign(null, Buffer.from(UpdateClient.canonicalManifest(manifestData)), signingKeyPem.replace(/\\n/g, '\n')).toString('base64');
|
||||
fs.writeFileSync(manifestPath, JSON.stringify(manifestData, null, 2), 'utf8');
|
||||
|
||||
console.log('Uploading manifest.json...');
|
||||
const manifestUrl = await uploadFileToGitLabPackage(manifestPath, 'vyla-home', version, `manifest-${timestamp}.json`);
|
||||
|
||||
@@ -251,13 +265,6 @@ async function main() {
|
||||
{ name: 'manifest.json', url: manifestUrl, link_type: 'other' }
|
||||
];
|
||||
|
||||
const manifestData = JSON.parse(fs.readFileSync(manifestPath, 'utf8'));
|
||||
for (const [name, c] of Object.entries(manifestData.components || {})) {
|
||||
console.log(`Uploading ${c.file}...`);
|
||||
const componentUrl = await uploadFileToGitLabPackage(path.join(__dirname, 'release-assets', c.file), 'vyla-home', version, `${name}-${timestamp}.zip`);
|
||||
releaseLinks.push({ name: c.file, url: componentUrl, link_type: 'other' });
|
||||
}
|
||||
|
||||
if (installerPath && installerUploadName) {
|
||||
console.log(`Uploading installer ${installerUploadName}...`);
|
||||
const ext = path.extname(installerUploadName);
|
||||
|
||||
Reference in New Issue
Block a user