Files
BMAD-METHOD/tools/semantic-release-sync-installer.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

31 lines
905 B
JavaScript

/**
* Semantic-release plugin to sync installer package.json version
*/
const fs = require('fs');
const path = require('path');
function prepare(pluginConfig, context) {
const { nextRelease, logger } = context;
// Path to installer package.json
const installerPackagePath = path.join(process.cwd(), 'tools', 'installer', 'package.json');
if (!fs.existsSync(installerPackagePath)) {
logger.log('Installer package.json not found, skipping sync');
return;
}
// Read installer package.json
const installerPackage = JSON.parse(fs.readFileSync(installerPackagePath, 'utf8'));
// Update version
installerPackage.version = nextRelease.version;
// Write back
fs.writeFileSync(installerPackagePath, JSON.stringify(installerPackage, null, 2) + '\n');
logger.log(`Synced installer package.json to version ${nextRelease.version}`);
}
module.exports = { prepare };