feat: local release workflow (signing + version sync); track updates.json; add .env.example

This commit is contained in:
Jordan Wages 2025-08-22 02:30:27 -05:00
commit 1c1f51a8b9
8 changed files with 158 additions and 3 deletions

39
scripts/sync-version.js Normal file
View file

@ -0,0 +1,39 @@
#!/usr/bin/env node
// Syncs manifest.json version with package.json version
const fs = require('fs');
const path = require('path');
const pkgPath = path.join(__dirname, '..', 'package.json');
const manifestPath = path.join(__dirname, '..', 'manifest.json');
function readJson(p) {
return JSON.parse(fs.readFileSync(p, 'utf8'));
}
function writeJson(p, obj) {
fs.writeFileSync(p, JSON.stringify(obj, null, 2) + '\n', 'utf8');
}
try {
const pkg = readJson(pkgPath);
const manifest = readJson(manifestPath);
const nextVersion = pkg.version;
if (!nextVersion) {
console.error('package.json is missing version');
process.exit(1);
}
if (manifest.version === nextVersion) {
console.log(`manifest.json already at version ${nextVersion}`);
process.exit(0);
}
manifest.version = nextVersion;
writeJson(manifestPath, manifest);
console.log(`Updated manifest.json version to ${nextVersion}`);
} catch (err) {
console.error('Failed to sync versions:', err.message);
process.exit(1);
}