fix(desktop): seed mac auto-update config (#10132)

Co-authored-by: Douwe M Osinga <douwe@sidewalklabs.com>
This commit is contained in:
Douwe Osinga
2026-07-01 12:26:40 -04:00
committed by GitHub
parent 363b309861
commit 006d585546
6 changed files with 68 additions and 4 deletions
@@ -0,0 +1,35 @@
#!/usr/bin/env node
const fs = require('node:fs');
const path = require('node:path');
function fail(message) {
console.error(message);
process.exit(1);
}
const appPath = process.argv[2];
if (!appPath) {
fail('Usage: node scripts/verify-mac-update-resources.js <path-to-app>');
}
const updateConfigPath = path.join(appPath, 'Contents', 'Resources', 'app-update.yml');
if (!fs.existsSync(updateConfigPath)) {
fail(`Missing ${updateConfigPath}`);
}
const updateConfig = fs.readFileSync(updateConfigPath, 'utf8');
const requiredLines = [
'provider: github',
'owner: aaif-goose',
'repo: goose',
'updaterCacheDirName: goose-updater',
];
for (const line of requiredLines) {
if (!updateConfig.split(/\r?\n/).includes(line)) {
fail(`${updateConfigPath} is missing "${line}"`);
}
}
console.log(`${updateConfigPath} is present and valid`);