mirror of
https://github.com/bmadcode/BMAD-METHOD.git
synced 2025-12-29 16:14:59 +00:00
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>
This commit is contained in:
31
tools/semantic-release-sync-installer.js
Normal file
31
tools/semantic-release-sync-installer.js
Normal file
@@ -0,0 +1,31 @@
|
||||
/**
|
||||
* 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 };
|
||||
Reference in New Issue
Block a user