feat: local release workflow (signing + version sync); track updates.json; add .env.example
This commit is contained in:
		
					parent
					
						
							
								9d5a3e4224
							
						
					
				
			
			
				commit
				
					
						1c1f51a8b9
					
				
			
		
					 8 changed files with 158 additions and 3 deletions
				
			
		
							
								
								
									
										39
									
								
								scripts/sync-version.js
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										39
									
								
								scripts/sync-version.js
									
										
									
									
									
										Normal 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);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue