version alignment
This commit is contained in:
@@ -1,4 +1,3 @@
|
|||||||
version: 4.29.0
|
|
||||||
markdownExploder: true
|
markdownExploder: true
|
||||||
prd:
|
prd:
|
||||||
prdFile: docs/prd.md
|
prdFile: docs/prd.md
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
name: bmad-2d-phaser-game-dev
|
name: bmad-2d-phaser-game-dev
|
||||||
version: 1.10.0
|
version: 1.11.0
|
||||||
short-title: Phaser 3 2D Game Dev Pack
|
short-title: Phaser 3 2D Game Dev Pack
|
||||||
description: >-
|
description: >-
|
||||||
2D Game Development expansion pack for BMad Method - Phaser 3 & TypeScript
|
2D Game Development expansion pack for BMad Method - Phaser 3 & TypeScript
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
name: bmad-2d-unity-game-dev
|
name: bmad-2d-unity-game-dev
|
||||||
version: 1.1.1
|
version: 1.2.0
|
||||||
short-title: Unity C# 2D Game Dev Pack
|
short-title: Unity C# 2D Game Dev Pack
|
||||||
description: >-
|
description: 2D Game Development expansion pack for BMad Method - Unity & C# focused
|
||||||
2D Game Development expansion pack for BMad Method - Unity & C#
|
|
||||||
focused
|
|
||||||
author: pbean (PinkyD)
|
author: pbean (PinkyD)
|
||||||
slashPrefix: bmad2du
|
slashPrefix: bmad2du
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
name: bmad-infrastructure-devops
|
name: bmad-infrastructure-devops
|
||||||
version: 1.9.0
|
version: 1.10.0
|
||||||
short-title: Infrastructure DevOps Pack
|
short-title: Infrastructure DevOps Pack
|
||||||
description: >-
|
description: >-
|
||||||
This expansion pack extends BMad Method with comprehensive infrastructure and
|
This expansion pack extends BMad Method with comprehensive infrastructure and
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "bmad-method",
|
"name": "bmad-method",
|
||||||
"version": "4.30.2",
|
"version": "4.31.0",
|
||||||
"description": "Breakthrough Method of Agile AI-driven Development",
|
"description": "Breakthrough Method of Agile AI-driven Development",
|
||||||
"main": "tools/cli.js",
|
"main": "tools/cli.js",
|
||||||
"bin": {
|
"bin": {
|
||||||
@@ -18,10 +18,6 @@
|
|||||||
"version:patch": "node tools/version-bump.js patch",
|
"version:patch": "node tools/version-bump.js patch",
|
||||||
"version:minor": "node tools/version-bump.js minor",
|
"version:minor": "node tools/version-bump.js minor",
|
||||||
"version:major": "node tools/version-bump.js major",
|
"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": "node tools/bump-expansion-version.js",
|
||||||
"version:expansion:set": "node tools/update-expansion-version.js",
|
"version:expansion:set": "node tools/update-expansion-version.js",
|
||||||
"version:all": "node tools/bump-all-versions.js",
|
"version:all": "node tools/bump-all-versions.js",
|
||||||
|
|||||||
@@ -31,21 +31,20 @@ function bumpVersion(currentVersion, type) {
|
|||||||
async function bumpAllVersions() {
|
async function bumpAllVersions() {
|
||||||
const updatedItems = [];
|
const updatedItems = [];
|
||||||
|
|
||||||
// First, bump the core version
|
// First, bump the core version (package.json)
|
||||||
const coreConfigPath = path.join(__dirname, '..', 'bmad-core', 'core-config.yaml');
|
const packagePath = path.join(__dirname, '..', 'package.json');
|
||||||
try {
|
try {
|
||||||
const coreConfigContent = fs.readFileSync(coreConfigPath, 'utf8');
|
const packageContent = fs.readFileSync(packagePath, 'utf8');
|
||||||
const coreConfig = yaml.load(coreConfigContent);
|
const packageJson = JSON.parse(packageContent);
|
||||||
const oldCoreVersion = coreConfig.version || '1.0.0';
|
const oldCoreVersion = packageJson.version || '1.0.0';
|
||||||
const newCoreVersion = bumpVersion(oldCoreVersion, bumpType);
|
const newCoreVersion = bumpVersion(oldCoreVersion, bumpType);
|
||||||
|
|
||||||
coreConfig.version = newCoreVersion;
|
packageJson.version = newCoreVersion;
|
||||||
|
|
||||||
const updatedCoreYaml = yaml.dump(coreConfig, { indent: 2 });
|
fs.writeFileSync(packagePath, JSON.stringify(packageJson, null, 2) + '\n');
|
||||||
fs.writeFileSync(coreConfigPath, updatedCoreYaml);
|
|
||||||
|
|
||||||
updatedItems.push({ type: 'core', name: 'BMad Core', oldVersion: oldCoreVersion, newVersion: newCoreVersion });
|
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) {
|
} catch (error) {
|
||||||
console.error(`✗ Failed to update BMad Core: ${error.message}`);
|
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;
|
let bmadOptionText;
|
||||||
if (state.type === 'v4_existing') {
|
if (state.type === 'v4_existing') {
|
||||||
const currentVersion = state.manifest?.version || 'unknown';
|
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
|
const versionInfo = currentVersion === newVersion
|
||||||
? `(v${currentVersion} - reinstall)`
|
? `(v${currentVersion} - reinstall)`
|
||||||
: `(v${currentVersion} → v${newVersion})`;
|
: `(v${currentVersion} → v${newVersion})`;
|
||||||
bmadOptionText = `Update ${coreShortTitle} ${versionInfo} .bmad-core`;
|
bmadOptionText = `Update ${coreShortTitle} ${versionInfo} .bmad-core`;
|
||||||
} else {
|
} else {
|
||||||
bmadOptionText = `${coreShortTitle} (v${coreConfig.version || version}) .bmad-core`;
|
bmadOptionText = `${coreShortTitle} (v${version}) .bmad-core`;
|
||||||
}
|
}
|
||||||
|
|
||||||
choices.push({
|
choices.push({
|
||||||
|
|||||||
@@ -116,15 +116,14 @@ class FileManager {
|
|||||||
this.manifestFile
|
this.manifestFile
|
||||||
);
|
);
|
||||||
|
|
||||||
// Read version from core-config.yaml
|
// Read version from package.json
|
||||||
const coreConfigPath = path.join(resourceLocator.getBmadCorePath(), "core-config.yaml");
|
|
||||||
let coreVersion = "unknown";
|
let coreVersion = "unknown";
|
||||||
try {
|
try {
|
||||||
const coreConfigContent = await fs.readFile(coreConfigPath, "utf8");
|
const packagePath = path.join(__dirname, '..', '..', '..', 'package.json');
|
||||||
const coreConfig = yaml.load(coreConfigContent);
|
const packageJson = require(packagePath);
|
||||||
coreVersion = coreConfig.version || "unknown";
|
coreVersion = packageJson.version;
|
||||||
} catch (error) {
|
} 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 = {
|
const manifest = {
|
||||||
|
|||||||
@@ -11,15 +11,13 @@ const resourceLocator = require("./resource-locator");
|
|||||||
|
|
||||||
class Installer {
|
class Installer {
|
||||||
async getCoreVersion() {
|
async getCoreVersion() {
|
||||||
const yaml = require("js-yaml");
|
|
||||||
const fs = require("fs-extra");
|
|
||||||
const coreConfigPath = path.join(resourceLocator.getBmadCorePath(), "core-config.yaml");
|
|
||||||
try {
|
try {
|
||||||
const coreConfigContent = await fs.readFile(coreConfigPath, "utf8");
|
// Always use package.json version
|
||||||
const coreConfig = yaml.load(coreConfigContent);
|
const packagePath = path.join(__dirname, '..', '..', '..', 'package.json');
|
||||||
return coreConfig.version || "unknown";
|
const packageJson = require(packagePath);
|
||||||
|
return packageJson.version;
|
||||||
} catch (error) {
|
} 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";
|
return "unknown";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user