Files
BMAD-METHOD/tools/sync-installer-version.js
Brian Madison 38a5024026 feat: improve semantic-release automation and disable manual version bumping
- Add custom semantic-release plugin to sync installer package.json
- Update semantic-release config to include installer package.json in releases
- Disable manual version bump script in favor of conventional commits
- Add helper script for version synchronization
- This ensures semantic-release fully manages both package.json files

BREAKING CHANGE: Manual version bumping via npm scripts is now disabled. Use conventional commits for automated releases.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-15 14:16:01 -05:00

34 lines
1.0 KiB
JavaScript

#!/usr/bin/env node
/**
* Sync installer package.json version with main package.json
* Used by semantic-release to keep versions in sync
*/
const fs = require('fs');
const path = require('path');
function syncInstallerVersion() {
// Read main package.json
const mainPackagePath = path.join(__dirname, '..', 'package.json');
const mainPackage = JSON.parse(fs.readFileSync(mainPackagePath, 'utf8'));
// Read installer package.json
const installerPackagePath = path.join(__dirname, 'installer', 'package.json');
const installerPackage = JSON.parse(fs.readFileSync(installerPackagePath, 'utf8'));
// Update installer version to match main version
installerPackage.version = mainPackage.version;
// Write back installer package.json
fs.writeFileSync(installerPackagePath, JSON.stringify(installerPackage, null, 2) + '\n');
console.log(`Synced installer version to ${mainPackage.version}`);
}
// Run if called directly
if (require.main === module) {
syncInstallerVersion();
}
module.exports = { syncInstallerVersion };