version alignment
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
version: 4.29.0
|
||||
markdownExploder: true
|
||||
prd:
|
||||
prdFile: docs/prd.md
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
name: bmad-2d-phaser-game-dev
|
||||
version: 1.10.0
|
||||
version: 1.11.0
|
||||
short-title: Phaser 3 2D Game Dev Pack
|
||||
description: >-
|
||||
2D Game Development expansion pack for BMad Method - Phaser 3 & TypeScript
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
name: bmad-2d-unity-game-dev
|
||||
version: 1.1.1
|
||||
version: 1.2.0
|
||||
short-title: Unity C# 2D Game Dev Pack
|
||||
description: >-
|
||||
2D Game Development expansion pack for BMad Method - Unity & C#
|
||||
focused
|
||||
description: 2D Game Development expansion pack for BMad Method - Unity & C# focused
|
||||
author: pbean (PinkyD)
|
||||
slashPrefix: bmad2du
|
||||
slashPrefix: bmad2du
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
name: bmad-infrastructure-devops
|
||||
version: 1.9.0
|
||||
version: 1.10.0
|
||||
short-title: Infrastructure DevOps Pack
|
||||
description: >-
|
||||
This expansion pack extends BMad Method with comprehensive infrastructure and
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "bmad-method",
|
||||
"version": "4.30.2",
|
||||
"version": "4.31.0",
|
||||
"description": "Breakthrough Method of Agile AI-driven Development",
|
||||
"main": "tools/cli.js",
|
||||
"bin": {
|
||||
@@ -18,10 +18,6 @@
|
||||
"version:patch": "node tools/version-bump.js patch",
|
||||
"version:minor": "node tools/version-bump.js minor",
|
||||
"version:major": "node tools/version-bump.js major",
|
||||
"version:core": "node tools/bump-core-version.js",
|
||||
"version:core:major": "node tools/bump-core-version.js major",
|
||||
"version:core:minor": "node tools/bump-core-version.js minor",
|
||||
"version:core:patch": "node tools/bump-core-version.js patch",
|
||||
"version:expansion": "node tools/bump-expansion-version.js",
|
||||
"version:expansion:set": "node tools/update-expansion-version.js",
|
||||
"version:all": "node tools/bump-all-versions.js",
|
||||
|
||||
@@ -31,21 +31,20 @@ function bumpVersion(currentVersion, type) {
|
||||
async function bumpAllVersions() {
|
||||
const updatedItems = [];
|
||||
|
||||
// First, bump the core version
|
||||
const coreConfigPath = path.join(__dirname, '..', 'bmad-core', 'core-config.yaml');
|
||||
// First, bump the core version (package.json)
|
||||
const packagePath = path.join(__dirname, '..', 'package.json');
|
||||
try {
|
||||
const coreConfigContent = fs.readFileSync(coreConfigPath, 'utf8');
|
||||
const coreConfig = yaml.load(coreConfigContent);
|
||||
const oldCoreVersion = coreConfig.version || '1.0.0';
|
||||
const packageContent = fs.readFileSync(packagePath, 'utf8');
|
||||
const packageJson = JSON.parse(packageContent);
|
||||
const oldCoreVersion = packageJson.version || '1.0.0';
|
||||
const newCoreVersion = bumpVersion(oldCoreVersion, bumpType);
|
||||
|
||||
coreConfig.version = newCoreVersion;
|
||||
packageJson.version = newCoreVersion;
|
||||
|
||||
const updatedCoreYaml = yaml.dump(coreConfig, { indent: 2 });
|
||||
fs.writeFileSync(coreConfigPath, updatedCoreYaml);
|
||||
fs.writeFileSync(packagePath, JSON.stringify(packageJson, null, 2) + '\n');
|
||||
|
||||
updatedItems.push({ type: 'core', name: 'BMad Core', oldVersion: oldCoreVersion, newVersion: newCoreVersion });
|
||||
console.log(`✓ BMad Core: ${oldCoreVersion} → ${newCoreVersion}`);
|
||||
console.log(`✓ BMad Core (package.json): ${oldCoreVersion} → ${newCoreVersion}`);
|
||||
} catch (error) {
|
||||
console.error(`✗ Failed to update BMad Core: ${error.message}`);
|
||||
}
|
||||
|
||||
@@ -1,56 +0,0 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
const yaml = require('js-yaml');
|
||||
|
||||
// --- Argument parsing ---
|
||||
const args = process.argv.slice(2);
|
||||
const bumpType = args[0] || 'minor';
|
||||
|
||||
if (!['major', 'minor', 'patch'].includes(bumpType)) {
|
||||
console.log('Usage: node bump-core-version.js [major|minor|patch]');
|
||||
console.log('Default: minor');
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
// --- Function to bump semantic version ---
|
||||
function bumpVersion(version, type) {
|
||||
const [major, minor, patch] = version.split('.').map(Number);
|
||||
|
||||
return {
|
||||
major: `${major + 1}.0.0`,
|
||||
minor: `${major}.${minor + 1}.0`,
|
||||
patch: `${major}.${minor}.${patch + 1}`,
|
||||
}[type] || version;
|
||||
}
|
||||
|
||||
// --- Main function ---
|
||||
function bumpCoreVersion() {
|
||||
const configPath = path.join(__dirname, '..', 'bmad-core', 'core-config.yaml');
|
||||
|
||||
try {
|
||||
const content = fs.readFileSync(configPath, 'utf8');
|
||||
const config = yaml.load(content);
|
||||
|
||||
const oldVersion = config.version || '1.0.0';
|
||||
const newVersion = bumpVersion(oldVersion, bumpType);
|
||||
|
||||
config.version = newVersion;
|
||||
const updatedYaml = yaml.dump(config, { indent: 2 });
|
||||
|
||||
fs.writeFileSync(configPath, updatedYaml);
|
||||
|
||||
console.log(`✓ BMad Core version bumped: ${oldVersion} → ${newVersion}\n`);
|
||||
console.log('Next steps:');
|
||||
console.log(`1. Test your changes`);
|
||||
console.log(`2. Commit:\n git add -A && git commit -m "chore: bump core version (${bumpType})"`);
|
||||
|
||||
} catch (err) {
|
||||
console.error(`✗ Failed to bump version: ${err.message}`);
|
||||
process.exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
// --- Run ---
|
||||
bumpCoreVersion();
|
||||
@@ -165,13 +165,13 @@ async function promptInstallation() {
|
||||
let bmadOptionText;
|
||||
if (state.type === 'v4_existing') {
|
||||
const currentVersion = state.manifest?.version || 'unknown';
|
||||
const newVersion = coreConfig.version || 'unknown'; // Use version from core-config.yaml
|
||||
const newVersion = version; // Always use package.json version
|
||||
const versionInfo = currentVersion === newVersion
|
||||
? `(v${currentVersion} - reinstall)`
|
||||
: `(v${currentVersion} → v${newVersion})`;
|
||||
bmadOptionText = `Update ${coreShortTitle} ${versionInfo} .bmad-core`;
|
||||
} else {
|
||||
bmadOptionText = `${coreShortTitle} (v${coreConfig.version || version}) .bmad-core`;
|
||||
bmadOptionText = `${coreShortTitle} (v${version}) .bmad-core`;
|
||||
}
|
||||
|
||||
choices.push({
|
||||
|
||||
@@ -116,15 +116,14 @@ class FileManager {
|
||||
this.manifestFile
|
||||
);
|
||||
|
||||
// Read version from core-config.yaml
|
||||
const coreConfigPath = path.join(resourceLocator.getBmadCorePath(), "core-config.yaml");
|
||||
// Read version from package.json
|
||||
let coreVersion = "unknown";
|
||||
try {
|
||||
const coreConfigContent = await fs.readFile(coreConfigPath, "utf8");
|
||||
const coreConfig = yaml.load(coreConfigContent);
|
||||
coreVersion = coreConfig.version || "unknown";
|
||||
const packagePath = path.join(__dirname, '..', '..', '..', 'package.json');
|
||||
const packageJson = require(packagePath);
|
||||
coreVersion = packageJson.version;
|
||||
} catch (error) {
|
||||
console.warn("Could not read version from core-config.yaml, using 'unknown'");
|
||||
console.warn("Could not read version from package.json, using 'unknown'");
|
||||
}
|
||||
|
||||
const manifest = {
|
||||
|
||||
@@ -11,15 +11,13 @@ const resourceLocator = require("./resource-locator");
|
||||
|
||||
class Installer {
|
||||
async getCoreVersion() {
|
||||
const yaml = require("js-yaml");
|
||||
const fs = require("fs-extra");
|
||||
const coreConfigPath = path.join(resourceLocator.getBmadCorePath(), "core-config.yaml");
|
||||
try {
|
||||
const coreConfigContent = await fs.readFile(coreConfigPath, "utf8");
|
||||
const coreConfig = yaml.load(coreConfigContent);
|
||||
return coreConfig.version || "unknown";
|
||||
// Always use package.json version
|
||||
const packagePath = path.join(__dirname, '..', '..', '..', 'package.json');
|
||||
const packageJson = require(packagePath);
|
||||
return packageJson.version;
|
||||
} catch (error) {
|
||||
console.warn("Could not read version from core-config.yaml, using 'unknown'");
|
||||
console.warn("Could not read version from package.json, using 'unknown'");
|
||||
return "unknown";
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user