bmad-method 4.20.0 ā 4.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/CONTRIBUTING.md +38 -4
- package/bmad-core/core-config.yml +1 -0
- package/dist/agents/dev.txt +1 -1
- package/dist/teams/team-all.txt +1 -1
- package/dist/teams/team-ide-minimal.txt +1 -1
- package/docs/how-to-contribute-with-pull-requests.md +24 -7
- package/expansion-packs/bmad-2d-phaser-game-dev/config.yml +4 -2
- package/expansion-packs/bmad-creator-tools/config.yml +1 -1
- package/expansion-packs/bmad-infrastructure-devops/config.yml +5 -2
- package/package.json +15 -1
- package/tools/bump-all-versions.js +107 -0
- package/tools/bump-core-version.js +57 -0
- package/tools/bump-expansion-version.js +78 -0
- package/tools/installer/bin/bmad.js +79 -158
- package/tools/installer/lib/file-manager.js +90 -2
- package/tools/installer/lib/installer.js +515 -64
- package/tools/installer/package.json +1 -1
- package/tools/update-expansion-version.js +54 -0
- package/test-ide-paths.js +0 -41
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
# [4.21.0](https://github.com/bmadcode/BMAD-METHOD/compare/v4.20.0...v4.21.0) (2025-06-30)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* remove unneeded files ([c48f200](https://github.com/bmadcode/BMAD-METHOD/commit/c48f200727384f37a42f4c6b1a946cb90f2445fe))
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* massive installer improvement update ([c151bda](https://github.com/bmadcode/BMAD-METHOD/commit/c151bda93833aa310ccc7c0eabcf483376f9e82a))
|
|
12
|
+
|
|
1
13
|
# [4.20.0](https://github.com/bmadcode/BMAD-METHOD/compare/v4.19.2...v4.20.0) (2025-06-29)
|
|
2
14
|
|
|
3
15
|
|
package/CONTRIBUTING.md
CHANGED
|
@@ -8,6 +8,11 @@ Thank you for considering contributing to this project! This document outlines t
|
|
|
8
8
|
|
|
9
9
|
Also note, we use the discussions feature in GitHub to have a community to discuss potential ideas, uses, additions and enhancements.
|
|
10
10
|
|
|
11
|
+
š¬ **Discord Community**: Join our [Discord server](https://discord.gg/g6ypHytrCB) for real-time discussions:
|
|
12
|
+
|
|
13
|
+
- **#general-dev** - Technical discussions, feature ideas, and development questions
|
|
14
|
+
- **#bugs-issues** - Bug reports and issue discussions
|
|
15
|
+
|
|
11
16
|
## Code of Conduct
|
|
12
17
|
|
|
13
18
|
By participating in this project, you agree to abide by our Code of Conduct. Please read it before participating.
|
|
@@ -16,16 +21,35 @@ By participating in this project, you agree to abide by our Code of Conduct. Ple
|
|
|
16
21
|
|
|
17
22
|
### Reporting Bugs
|
|
18
23
|
|
|
19
|
-
|
|
20
|
-
-
|
|
21
|
-
-
|
|
24
|
+
1. **Check existing issues** first to avoid duplicates
|
|
25
|
+
2. **Use the bug report template** when creating a new issue - it will guide you through providing:
|
|
26
|
+
- Clear bug description
|
|
27
|
+
- Steps to reproduce
|
|
28
|
+
- Expected vs actual behavior
|
|
29
|
+
- Model/IDE/BMad version details
|
|
30
|
+
- Screenshots or links if applicable
|
|
31
|
+
3. **Consider discussing in Discord** (#bugs-issues channel) for quick help
|
|
32
|
+
4. **Indicate if you're working on a fix** to avoid duplicate efforts
|
|
22
33
|
|
|
23
34
|
### Suggesting Features
|
|
24
35
|
|
|
25
|
-
|
|
36
|
+
1. **Discuss first in Discord** (#general-dev channel) - the feature request template asks if you've done this
|
|
37
|
+
2. **Check existing issues and discussions** to avoid duplicates
|
|
38
|
+
3. **Use the feature request template** when creating an issue - it will guide you through:
|
|
39
|
+
- Confirming Discord discussion
|
|
40
|
+
- Describing the problem it solves
|
|
41
|
+
- Explaining your solution
|
|
42
|
+
- Listing alternatives considered
|
|
43
|
+
4. **Be specific** about why this feature would benefit the BMad community
|
|
26
44
|
|
|
27
45
|
### Pull Request Process
|
|
28
46
|
|
|
47
|
+
ā ļø **Before starting work:**
|
|
48
|
+
|
|
49
|
+
1. **For bugs**: Check if an issue exists (create one using the bug template if not)
|
|
50
|
+
2. **For features**: Ensure you've discussed in Discord (#general-dev) AND created a feature request issue
|
|
51
|
+
3. **For large changes**: Always open an issue first to discuss alignment
|
|
52
|
+
|
|
29
53
|
Please only propose small granular commits! If its large or significant, please discuss in the discussions tab and open up an issue first. I do not want you to waste your time on a potentially very large PR to have it rejected because it is not aligned or deviates from other planned changes. Communicate and lets work together to build and improve this great community project!
|
|
30
54
|
|
|
31
55
|
**Important**: All contributions must align with our [Guiding Principles](GUIDING-PRINCIPLES.md). Key points:
|
|
@@ -95,6 +119,15 @@ Example breakdown:
|
|
|
95
119
|
6. Push to your branch (`git push origin feature/your-feature-name`)
|
|
96
120
|
7. Open a Pull Request against the main branch
|
|
97
121
|
|
|
122
|
+
## Issue Templates
|
|
123
|
+
|
|
124
|
+
We use GitHub issue templates to ensure all necessary information is provided:
|
|
125
|
+
|
|
126
|
+
- **Bug Reports**: Automatically guides you through providing reproduction steps, environment details, and expected behavior
|
|
127
|
+
- **Feature Requests**: Requires Discord discussion confirmation and asks for problem/solution descriptions
|
|
128
|
+
|
|
129
|
+
Using these templates helps maintainers understand and address your contribution faster.
|
|
130
|
+
|
|
98
131
|
## Pull Request Description Guidelines
|
|
99
132
|
|
|
100
133
|
Keep PR descriptions short and to the point following this template:
|
|
@@ -111,6 +144,7 @@ Keep your PR description concise and focused. Use this template:
|
|
|
111
144
|
## Why
|
|
112
145
|
|
|
113
146
|
[1-2 sentences explaining WHY this change is needed]
|
|
147
|
+
Fixes #[issue number] (if applicable)
|
|
114
148
|
|
|
115
149
|
## How
|
|
116
150
|
|
package/dist/agents/dev.txt
CHANGED
|
@@ -83,7 +83,7 @@ task-execution:
|
|
|
83
83
|
updates-ONLY:
|
|
84
84
|
- 'Checkboxes: [ ] not started | [-] in progress | [x] complete'
|
|
85
85
|
- 'Debug Log: | Task | File | Change | Reverted? |'
|
|
86
|
-
- 'Completion Notes: Deviations only, <50 words'
|
|
86
|
+
- 'Completion Notes: Deviations from AC or tasks during execution only, <50 words'
|
|
87
87
|
- 'Change Log: Requirement changes only'
|
|
88
88
|
- 'File List: CRITICAL - Maintain complete list of ALL files created/modified during implementation'
|
|
89
89
|
blocking: Unapproved deps | Ambiguous after story check | 3 failures | Missing config | Failing validations
|
package/dist/teams/team-all.txt
CHANGED
|
@@ -353,7 +353,7 @@ task-execution:
|
|
|
353
353
|
updates-ONLY:
|
|
354
354
|
- 'Checkboxes: [ ] not started | [-] in progress | [x] complete'
|
|
355
355
|
- 'Debug Log: | Task | File | Change | Reverted? |'
|
|
356
|
-
- 'Completion Notes: Deviations only, <50 words'
|
|
356
|
+
- 'Completion Notes: Deviations from AC or tasks during execution only, <50 words'
|
|
357
357
|
- 'Change Log: Requirement changes only'
|
|
358
358
|
- 'File List: CRITICAL - Maintain complete list of ALL files created/modified during implementation'
|
|
359
359
|
blocking: Unapproved deps | Ambiguous after story check | 3 failures | Missing config | Failing validations
|
|
@@ -335,7 +335,7 @@ task-execution:
|
|
|
335
335
|
updates-ONLY:
|
|
336
336
|
- 'Checkboxes: [ ] not started | [-] in progress | [x] complete'
|
|
337
337
|
- 'Debug Log: | Task | File | Change | Reverted? |'
|
|
338
|
-
- 'Completion Notes: Deviations only, <50 words'
|
|
338
|
+
- 'Completion Notes: Deviations from AC or tasks during execution only, <50 words'
|
|
339
339
|
- 'Change Log: Requirement changes only'
|
|
340
340
|
- 'File List: CRITICAL - Maintain complete list of ALL files created/modified during implementation'
|
|
341
341
|
blocking: Unapproved deps | Ambiguous after story check | 3 failures | Missing config | Failing validations
|
|
@@ -8,7 +8,15 @@ A pull request (PR) is how you propose changes to a project on GitHub. Think of
|
|
|
8
8
|
|
|
9
9
|
## Before You Start
|
|
10
10
|
|
|
11
|
-
ā ļø **Important**: Please keep your contributions small and focused! We prefer many small, clear changes rather than one massive change.
|
|
11
|
+
ā ļø **Important**: Please keep your contributions small and focused! We prefer many small, clear changes rather than one massive change.
|
|
12
|
+
|
|
13
|
+
**Required before submitting PRs:**
|
|
14
|
+
|
|
15
|
+
- **For bug fixes**: Create an issue using the [bug report template](https://github.com/bmadcode/bmad-method/issues/new?template=bug_report.md)
|
|
16
|
+
- **For new features**:
|
|
17
|
+
1. Discuss in Discord [#general-dev channel](https://discord.gg/g6ypHytrCB)
|
|
18
|
+
2. Create an issue using the [feature request template](https://github.com/bmadcode/bmad-method/issues/new?template=feature_request.md)
|
|
19
|
+
- **For large changes**: Always open an issue first to discuss alignment
|
|
12
20
|
|
|
13
21
|
## Step-by-Step Guide
|
|
14
22
|
|
|
@@ -82,9 +90,15 @@ git push origin fix/typo-in-readme
|
|
|
82
90
|
|
|
83
91
|
1. Go to your fork on GitHub
|
|
84
92
|
2. You'll see a green "Compare & pull request" button - click it
|
|
85
|
-
3.
|
|
86
|
-
- **
|
|
87
|
-
- **
|
|
93
|
+
3. Select the correct target branch:
|
|
94
|
+
- **`next` branch** for most contributions (features, docs, enhancements)
|
|
95
|
+
- **`main` branch** only for critical fixes
|
|
96
|
+
4. Fill out the PR description using the template in CONTRIBUTING.md:
|
|
97
|
+
- **What**: 1-2 sentences describing what changed
|
|
98
|
+
- **Why**: 1-2 sentences explaining why
|
|
99
|
+
- **How**: 2-3 bullets on implementation
|
|
100
|
+
- **Testing**: How you tested
|
|
101
|
+
5. Reference the related issue number (e.g., "Fixes #123")
|
|
88
102
|
|
|
89
103
|
### 8. Wait for Review
|
|
90
104
|
|
|
@@ -117,9 +131,12 @@ git push origin fix/typo-in-readme
|
|
|
117
131
|
|
|
118
132
|
## Need Help?
|
|
119
133
|
|
|
120
|
-
- š¬ Join our [Discord Community](https://discord.gg/g6ypHytrCB) for real-time help
|
|
121
|
-
-
|
|
122
|
-
-
|
|
134
|
+
- š¬ Join our [Discord Community](https://discord.gg/g6ypHytrCB) for real-time help:
|
|
135
|
+
- **#general-dev** - Technical questions and feature discussions
|
|
136
|
+
- **#bugs-issues** - Get help with bugs before filing issues
|
|
137
|
+
- š¬ Ask questions in [GitHub Discussions](https://github.com/bmadcode/bmad-method/discussions)
|
|
138
|
+
- š Report bugs using the [bug report template](https://github.com/bmadcode/bmad-method/issues/new?template=bug_report.md)
|
|
139
|
+
- š” Suggest features using the [feature request template](https://github.com/bmadcode/bmad-method/issues/new?template=feature_request.md)
|
|
123
140
|
- š Read the full [Contributing Guidelines](../CONTRIBUTING.md)
|
|
124
141
|
|
|
125
142
|
## Example: Good vs Bad PRs
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
name: bmad-2d-phaser-game-dev
|
|
2
|
-
version: 1.1.
|
|
2
|
+
version: 1.1.2
|
|
3
3
|
short-title: 2D game development with Phaser 3 & TypeScript
|
|
4
|
-
description:
|
|
4
|
+
description: >-
|
|
5
|
+
2D Game Development expansion pack for BMAD Method - Phaser 3 & TypeScript
|
|
6
|
+
focused
|
|
5
7
|
author: Brian (BMad)
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
name: bmad-infrastructure-devops
|
|
2
|
-
version: 1.0.
|
|
2
|
+
version: 1.0.2
|
|
3
3
|
short-title: Infrastructure and DevOps capabilities
|
|
4
|
-
description:
|
|
4
|
+
description: >-
|
|
5
|
+
This expansion pack extends BMAD Method with comprehensive infrastructure and
|
|
6
|
+
DevOps capabilities. It's designed for teams that need to define, implement,
|
|
7
|
+
and manage cloud infrastructure alongside their application development.
|
|
5
8
|
author: Brian (BMad)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bmad-method",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.21.0",
|
|
4
4
|
"description": "Breakthrough Method of Agile AI-driven Development",
|
|
5
5
|
"main": "tools/cli.js",
|
|
6
6
|
"bin": {
|
|
@@ -18,6 +18,20 @@
|
|
|
18
18
|
"version:patch": "node tools/version-bump.js patch",
|
|
19
19
|
"version:minor": "node tools/version-bump.js minor",
|
|
20
20
|
"version:major": "node tools/version-bump.js major",
|
|
21
|
+
"version:core": "node tools/bump-core-version.js",
|
|
22
|
+
"version:core:major": "node tools/bump-core-version.js major",
|
|
23
|
+
"version:core:minor": "node tools/bump-core-version.js minor",
|
|
24
|
+
"version:core:patch": "node tools/bump-core-version.js patch",
|
|
25
|
+
"version:expansion": "node tools/bump-expansion-version.js",
|
|
26
|
+
"version:expansion:set": "node tools/update-expansion-version.js",
|
|
27
|
+
"version:all": "node tools/bump-all-versions.js",
|
|
28
|
+
"version:all:minor": "node tools/bump-all-versions.js minor",
|
|
29
|
+
"version:all:major": "node tools/bump-all-versions.js major",
|
|
30
|
+
"version:all:patch": "node tools/bump-all-versions.js patch",
|
|
31
|
+
"version:expansion:all": "node tools/bump-all-versions.js",
|
|
32
|
+
"version:expansion:all:minor": "node tools/bump-all-versions.js minor",
|
|
33
|
+
"version:expansion:all:major": "node tools/bump-all-versions.js major",
|
|
34
|
+
"version:expansion:all:patch": "node tools/bump-all-versions.js patch",
|
|
21
35
|
"release": "semantic-release",
|
|
22
36
|
"release:test": "semantic-release --dry-run --no-ci || echo 'Config test complete - authentication errors are expected locally'",
|
|
23
37
|
"prepare": "husky"
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const fs = require('fs');
|
|
4
|
+
const path = require('path');
|
|
5
|
+
const yaml = require('js-yaml');
|
|
6
|
+
|
|
7
|
+
const args = process.argv.slice(2);
|
|
8
|
+
const bumpType = args[0] || 'minor'; // default to minor
|
|
9
|
+
|
|
10
|
+
if (!['major', 'minor', 'patch'].includes(bumpType)) {
|
|
11
|
+
console.log('Usage: node bump-all-versions.js [major|minor|patch]');
|
|
12
|
+
console.log('Default: minor');
|
|
13
|
+
process.exit(1);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
function bumpVersion(currentVersion, type) {
|
|
17
|
+
const [major, minor, patch] = currentVersion.split('.').map(Number);
|
|
18
|
+
|
|
19
|
+
switch (type) {
|
|
20
|
+
case 'major':
|
|
21
|
+
return `${major + 1}.0.0`;
|
|
22
|
+
case 'minor':
|
|
23
|
+
return `${major}.${minor + 1}.0`;
|
|
24
|
+
case 'patch':
|
|
25
|
+
return `${major}.${minor}.${patch + 1}`;
|
|
26
|
+
default:
|
|
27
|
+
return currentVersion;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
async function bumpAllVersions() {
|
|
32
|
+
const updatedItems = [];
|
|
33
|
+
|
|
34
|
+
// First, bump the core version
|
|
35
|
+
const coreConfigPath = path.join(__dirname, '..', 'bmad-core', 'core-config.yml');
|
|
36
|
+
try {
|
|
37
|
+
const coreConfigContent = fs.readFileSync(coreConfigPath, 'utf8');
|
|
38
|
+
const coreConfig = yaml.load(coreConfigContent);
|
|
39
|
+
const oldCoreVersion = coreConfig.version || '1.0.0';
|
|
40
|
+
const newCoreVersion = bumpVersion(oldCoreVersion, bumpType);
|
|
41
|
+
|
|
42
|
+
coreConfig.version = newCoreVersion;
|
|
43
|
+
|
|
44
|
+
const updatedCoreYaml = yaml.dump(coreConfig, { indent: 2 });
|
|
45
|
+
fs.writeFileSync(coreConfigPath, updatedCoreYaml);
|
|
46
|
+
|
|
47
|
+
updatedItems.push({ type: 'core', name: 'BMad Core', oldVersion: oldCoreVersion, newVersion: newCoreVersion });
|
|
48
|
+
console.log(`ā BMad Core: ${oldCoreVersion} ā ${newCoreVersion}`);
|
|
49
|
+
} catch (error) {
|
|
50
|
+
console.error(`ā Failed to update BMad Core: ${error.message}`);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
// Then, bump all expansion packs
|
|
54
|
+
const expansionPacksDir = path.join(__dirname, '..', 'expansion-packs');
|
|
55
|
+
|
|
56
|
+
try {
|
|
57
|
+
const entries = fs.readdirSync(expansionPacksDir, { withFileTypes: true });
|
|
58
|
+
|
|
59
|
+
for (const entry of entries) {
|
|
60
|
+
if (entry.isDirectory() && !entry.name.startsWith('.') && entry.name !== 'README.md') {
|
|
61
|
+
const packId = entry.name;
|
|
62
|
+
const configPath = path.join(expansionPacksDir, packId, 'config.yml');
|
|
63
|
+
|
|
64
|
+
if (fs.existsSync(configPath)) {
|
|
65
|
+
try {
|
|
66
|
+
const configContent = fs.readFileSync(configPath, 'utf8');
|
|
67
|
+
const config = yaml.load(configContent);
|
|
68
|
+
const oldVersion = config.version || '1.0.0';
|
|
69
|
+
const newVersion = bumpVersion(oldVersion, bumpType);
|
|
70
|
+
|
|
71
|
+
config.version = newVersion;
|
|
72
|
+
|
|
73
|
+
const updatedYaml = yaml.dump(config, { indent: 2 });
|
|
74
|
+
fs.writeFileSync(configPath, updatedYaml);
|
|
75
|
+
|
|
76
|
+
updatedItems.push({ type: 'expansion', name: packId, oldVersion, newVersion });
|
|
77
|
+
console.log(`ā ${packId}: ${oldVersion} ā ${newVersion}`);
|
|
78
|
+
|
|
79
|
+
} catch (error) {
|
|
80
|
+
console.error(`ā Failed to update ${packId}: ${error.message}`);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
if (updatedItems.length > 0) {
|
|
87
|
+
const coreCount = updatedItems.filter(i => i.type === 'core').length;
|
|
88
|
+
const expansionCount = updatedItems.filter(i => i.type === 'expansion').length;
|
|
89
|
+
|
|
90
|
+
console.log(`\nā Successfully bumped ${updatedItems.length} item(s) with ${bumpType} version bump`);
|
|
91
|
+
if (coreCount > 0) console.log(` - ${coreCount} core`);
|
|
92
|
+
if (expansionCount > 0) console.log(` - ${expansionCount} expansion pack(s)`);
|
|
93
|
+
|
|
94
|
+
console.log('\nNext steps:');
|
|
95
|
+
console.log('1. Test the changes');
|
|
96
|
+
console.log('2. Commit: git add -A && git commit -m "chore: bump all versions (' + bumpType + ')"');
|
|
97
|
+
} else {
|
|
98
|
+
console.log('No items found to update');
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
} catch (error) {
|
|
102
|
+
console.error('Error reading expansion packs directory:', error.message);
|
|
103
|
+
process.exit(1);
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
bumpAllVersions();
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const fs = require('fs');
|
|
4
|
+
const path = require('path');
|
|
5
|
+
const yaml = require('js-yaml');
|
|
6
|
+
|
|
7
|
+
const args = process.argv.slice(2);
|
|
8
|
+
const bumpType = args[0] || 'minor'; // default to minor
|
|
9
|
+
|
|
10
|
+
if (!['major', 'minor', 'patch'].includes(bumpType)) {
|
|
11
|
+
console.log('Usage: node bump-core-version.js [major|minor|patch]');
|
|
12
|
+
console.log('Default: minor');
|
|
13
|
+
process.exit(1);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
function bumpVersion(currentVersion, type) {
|
|
17
|
+
const [major, minor, patch] = currentVersion.split('.').map(Number);
|
|
18
|
+
|
|
19
|
+
switch (type) {
|
|
20
|
+
case 'major':
|
|
21
|
+
return `${major + 1}.0.0`;
|
|
22
|
+
case 'minor':
|
|
23
|
+
return `${major}.${minor + 1}.0`;
|
|
24
|
+
case 'patch':
|
|
25
|
+
return `${major}.${minor}.${patch + 1}`;
|
|
26
|
+
default:
|
|
27
|
+
return currentVersion;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
async function bumpCoreVersion() {
|
|
32
|
+
try {
|
|
33
|
+
const coreConfigPath = path.join(__dirname, '..', 'bmad-core', 'core-config.yml');
|
|
34
|
+
|
|
35
|
+
const coreConfigContent = fs.readFileSync(coreConfigPath, 'utf8');
|
|
36
|
+
const coreConfig = yaml.load(coreConfigContent);
|
|
37
|
+
const oldVersion = coreConfig.version || '1.0.0';
|
|
38
|
+
const newVersion = bumpVersion(oldVersion, bumpType);
|
|
39
|
+
|
|
40
|
+
coreConfig.version = newVersion;
|
|
41
|
+
|
|
42
|
+
const updatedYaml = yaml.dump(coreConfig, { indent: 2 });
|
|
43
|
+
fs.writeFileSync(coreConfigPath, updatedYaml);
|
|
44
|
+
|
|
45
|
+
console.log(`ā BMad Core: ${oldVersion} ā ${newVersion}`);
|
|
46
|
+
console.log(`\nā Successfully bumped BMad Core with ${bumpType} version bump`);
|
|
47
|
+
console.log('\nNext steps:');
|
|
48
|
+
console.log('1. Test the changes');
|
|
49
|
+
console.log('2. Commit: git add -A && git commit -m "chore: bump core version (' + bumpType + ')"');
|
|
50
|
+
|
|
51
|
+
} catch (error) {
|
|
52
|
+
console.error('Error updating core version:', error.message);
|
|
53
|
+
process.exit(1);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
bumpCoreVersion();
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const fs = require('fs');
|
|
4
|
+
const path = require('path');
|
|
5
|
+
const yaml = require('js-yaml');
|
|
6
|
+
|
|
7
|
+
const args = process.argv.slice(2);
|
|
8
|
+
|
|
9
|
+
if (args.length < 1 || args.length > 2) {
|
|
10
|
+
console.log('Usage: node bump-expansion-version.js <expansion-pack-id> [major|minor|patch]');
|
|
11
|
+
console.log('Default: minor');
|
|
12
|
+
console.log('Example: node bump-expansion-version.js bmad-creator-tools patch');
|
|
13
|
+
process.exit(1);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
const packId = args[0];
|
|
17
|
+
const bumpType = args[1] || 'minor'; // default to minor
|
|
18
|
+
|
|
19
|
+
if (!['major', 'minor', 'patch'].includes(bumpType)) {
|
|
20
|
+
console.error('Error: Bump type must be major, minor, or patch');
|
|
21
|
+
process.exit(1);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
function bumpVersion(currentVersion, type) {
|
|
25
|
+
const [major, minor, patch] = currentVersion.split('.').map(Number);
|
|
26
|
+
|
|
27
|
+
switch (type) {
|
|
28
|
+
case 'major':
|
|
29
|
+
return `${major + 1}.0.0`;
|
|
30
|
+
case 'minor':
|
|
31
|
+
return `${major}.${minor + 1}.0`;
|
|
32
|
+
case 'patch':
|
|
33
|
+
return `${major}.${minor}.${patch + 1}`;
|
|
34
|
+
default:
|
|
35
|
+
return currentVersion;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
async function updateVersion() {
|
|
40
|
+
try {
|
|
41
|
+
const configPath = path.join(__dirname, '..', 'expansion-packs', packId, 'config.yml');
|
|
42
|
+
|
|
43
|
+
if (!fs.existsSync(configPath)) {
|
|
44
|
+
console.error(`Error: Expansion pack '${packId}' not found`);
|
|
45
|
+
console.log('\nAvailable expansion packs:');
|
|
46
|
+
const expansionPacksDir = path.join(__dirname, '..', 'expansion-packs');
|
|
47
|
+
const entries = fs.readdirSync(expansionPacksDir, { withFileTypes: true });
|
|
48
|
+
entries.forEach(entry => {
|
|
49
|
+
if (entry.isDirectory() && !entry.name.startsWith('.')) {
|
|
50
|
+
console.log(` - ${entry.name}`);
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
process.exit(1);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
const configContent = fs.readFileSync(configPath, 'utf8');
|
|
57
|
+
const config = yaml.load(configContent);
|
|
58
|
+
const oldVersion = config.version || '1.0.0';
|
|
59
|
+
const newVersion = bumpVersion(oldVersion, bumpType);
|
|
60
|
+
|
|
61
|
+
config.version = newVersion;
|
|
62
|
+
|
|
63
|
+
const updatedYaml = yaml.dump(config, { indent: 2 });
|
|
64
|
+
fs.writeFileSync(configPath, updatedYaml);
|
|
65
|
+
|
|
66
|
+
console.log(`ā ${packId}: ${oldVersion} ā ${newVersion}`);
|
|
67
|
+
console.log(`\nā Successfully bumped ${packId} with ${bumpType} version bump`);
|
|
68
|
+
console.log('\nNext steps:');
|
|
69
|
+
console.log('1. Test the changes');
|
|
70
|
+
console.log('2. Commit: git add -A && git commit -m "chore: bump ' + packId + ' version (' + bumpType + ')"');
|
|
71
|
+
|
|
72
|
+
} catch (error) {
|
|
73
|
+
console.error('Error updating version:', error.message);
|
|
74
|
+
process.exit(1);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
updateVersion();
|