mirror of
https://github.com/bmadcode/BMAD-METHOD.git
synced 2025-12-29 16:14:59 +00:00
fix: standardize on file extension .yaml instead of a mix of yml and yaml
This commit is contained in:
@@ -259,7 +259,7 @@ class WebBuilder {
|
||||
const agentTeamsDir = path.join(packDir, "agent-teams");
|
||||
try {
|
||||
const teamFiles = await fs.readdir(agentTeamsDir);
|
||||
const teamFile = teamFiles.find((f) => f.endsWith(".yml"));
|
||||
const teamFile = teamFiles.find((f) => f.endsWith(".yaml"));
|
||||
|
||||
if (teamFile) {
|
||||
console.log(` Building team bundle for ${packName}`);
|
||||
@@ -272,7 +272,7 @@ class WebBuilder {
|
||||
for (const outputDir of outputDirs) {
|
||||
const teamsOutputDir = path.join(outputDir, "teams");
|
||||
await fs.mkdir(teamsOutputDir, { recursive: true });
|
||||
const outputFile = path.join(teamsOutputDir, teamFile.replace(".yml", ".txt"));
|
||||
const outputFile = path.join(teamsOutputDir, teamFile.replace(".yaml", ".txt"));
|
||||
await fs.writeFile(outputFile, bundle, "utf8");
|
||||
console.log(` ✓ Created bundle: ${path.relative(this.rootDir, outputFile)}`);
|
||||
}
|
||||
@@ -306,7 +306,7 @@ class WebBuilder {
|
||||
if (Array.isArray(resources)) {
|
||||
for (const resourceName of resources) {
|
||||
let found = false;
|
||||
const extensions = [".md", ".yml", ".yaml"];
|
||||
const extensions = [".md", ".yaml"];
|
||||
|
||||
// Try expansion pack first
|
||||
for (const ext of extensions) {
|
||||
@@ -391,7 +391,7 @@ class WebBuilder {
|
||||
|
||||
// Add team configuration and parse to get agent list
|
||||
const teamContent = await fs.readFile(teamConfigPath, "utf8");
|
||||
const teamFileName = path.basename(teamConfigPath, ".yml");
|
||||
const teamFileName = path.basename(teamConfigPath, ".yaml");
|
||||
const teamConfig = this.parseYaml(teamContent);
|
||||
sections.push(this.formatSection(`agent-teams#${teamFileName}`, teamContent));
|
||||
|
||||
@@ -416,9 +416,9 @@ class WebBuilder {
|
||||
try {
|
||||
const resourceFiles = await fs.readdir(resourcePath);
|
||||
for (const resourceFile of resourceFiles.filter(
|
||||
(f) => f.endsWith(".md") || f.endsWith(".yml")
|
||||
(f) => f.endsWith(".md") || f.endsWith(".yaml")
|
||||
)) {
|
||||
const fileName = resourceFile.replace(/\.(md|yml)$/, "");
|
||||
const fileName = resourceFile.replace(/\.(md|yaml)$/, "");
|
||||
expansionResources.set(`${resourceDir}#${fileName}`, true);
|
||||
}
|
||||
} catch (error) {
|
||||
@@ -508,7 +508,7 @@ class WebBuilder {
|
||||
// Always prefer expansion pack versions if they exist
|
||||
for (const [key, dep] of allDependencies) {
|
||||
let found = false;
|
||||
const extensions = [".md", ".yml", ".yaml"];
|
||||
const extensions = [".md", ".yaml"];
|
||||
|
||||
// Always check expansion pack first, even if the dependency came from a core agent
|
||||
if (expansionResources.has(key)) {
|
||||
@@ -568,7 +568,7 @@ class WebBuilder {
|
||||
try {
|
||||
const resourceFiles = await fs.readdir(resourcePath);
|
||||
for (const resourceFile of resourceFiles.filter(
|
||||
(f) => f.endsWith(".md") || f.endsWith(".yml")
|
||||
(f) => f.endsWith(".md") || f.endsWith(".yaml")
|
||||
)) {
|
||||
const filePath = path.join(resourcePath, resourceFile);
|
||||
const fileContent = await fs.readFile(filePath, "utf8");
|
||||
|
||||
@@ -32,7 +32,7 @@ async function bumpAllVersions() {
|
||||
const updatedItems = [];
|
||||
|
||||
// First, bump the core version
|
||||
const coreConfigPath = path.join(__dirname, '..', 'bmad-core', 'core-config.yml');
|
||||
const coreConfigPath = path.join(__dirname, '..', 'bmad-core', 'core-config.yaml');
|
||||
try {
|
||||
const coreConfigContent = fs.readFileSync(coreConfigPath, 'utf8');
|
||||
const coreConfig = yaml.load(coreConfigContent);
|
||||
@@ -59,7 +59,7 @@ async function bumpAllVersions() {
|
||||
for (const entry of entries) {
|
||||
if (entry.isDirectory() && !entry.name.startsWith('.') && entry.name !== 'README.md') {
|
||||
const packId = entry.name;
|
||||
const configPath = path.join(expansionPacksDir, packId, 'config.yml');
|
||||
const configPath = path.join(expansionPacksDir, packId, 'config.yaml');
|
||||
|
||||
if (fs.existsSync(configPath)) {
|
||||
try {
|
||||
|
||||
@@ -30,7 +30,7 @@ function bumpVersion(currentVersion, type) {
|
||||
|
||||
async function bumpCoreVersion() {
|
||||
try {
|
||||
const coreConfigPath = path.join(__dirname, '..', 'bmad-core', 'core-config.yml');
|
||||
const coreConfigPath = path.join(__dirname, '..', 'bmad-core', 'core-config.yaml');
|
||||
|
||||
const coreConfigContent = fs.readFileSync(coreConfigPath, 'utf8');
|
||||
const coreConfig = yaml.load(coreConfigContent);
|
||||
|
||||
@@ -38,7 +38,7 @@ function bumpVersion(currentVersion, type) {
|
||||
|
||||
async function updateVersion() {
|
||||
try {
|
||||
const configPath = path.join(__dirname, '..', 'expansion-packs', packId, 'config.yml');
|
||||
const configPath = path.join(__dirname, '..', 'expansion-packs', packId, 'config.yaml');
|
||||
|
||||
if (!fs.existsSync(configPath)) {
|
||||
console.error(`Error: Expansion pack '${packId}' not found`);
|
||||
|
||||
@@ -16,7 +16,7 @@ installer/
|
||||
│ ├── ide-setup.js # IDE-specific setup
|
||||
│ └── prompts.js # Interactive CLI prompts
|
||||
├── config/ # Configuration files
|
||||
│ └── install.config.yml # Installation profiles
|
||||
│ └── install.config.yaml # Installation profiles
|
||||
├── templates/ # IDE template files
|
||||
│ ├── cursor-rules.md # Cursor template
|
||||
│ ├── claude-commands.md # Claude Code template
|
||||
|
||||
@@ -158,7 +158,7 @@ async function promptInstallation() {
|
||||
const choices = [];
|
||||
|
||||
// Load core config to get short-title
|
||||
const coreConfigPath = path.join(__dirname, '..', '..', '..', 'bmad-core', 'core-config.yml');
|
||||
const coreConfigPath = path.join(__dirname, '..', '..', '..', 'bmad-core', 'core-config.yaml');
|
||||
const coreConfig = yaml.load(await fs.readFile(coreConfigPath, 'utf8'));
|
||||
const coreShortTitle = coreConfig['short-title'] || 'BMad Agile Core System';
|
||||
|
||||
@@ -166,7 +166,7 @@ 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.yml
|
||||
const newVersion = coreConfig.version || 'unknown'; // Use version from core-config.yaml
|
||||
const versionInfo = currentVersion === newVersion
|
||||
? `(v${currentVersion} - reinstall)`
|
||||
: `(v${currentVersion} → v${newVersion})`;
|
||||
|
||||
@@ -4,7 +4,7 @@ const yaml = require('js-yaml');
|
||||
|
||||
class ConfigLoader {
|
||||
constructor() {
|
||||
this.configPath = path.join(__dirname, '..', 'config', 'install.config.yml');
|
||||
this.configPath = path.join(__dirname, '..', 'config', 'install.config.yaml');
|
||||
this.config = null;
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ class ConfigLoader {
|
||||
const agentContent = await fs.readFile(agentPath, 'utf8');
|
||||
|
||||
// Extract YAML block from agent file
|
||||
const yamlMatch = agentContent.match(/```yml\n([\s\S]*?)\n```/);
|
||||
const yamlMatch = agentContent.match(/```yaml\n([\s\S]*?)\n```/);
|
||||
if (yamlMatch) {
|
||||
const yamlContent = yaml.load(yamlMatch[1]);
|
||||
const agentConfig = yamlContent.agent || {};
|
||||
@@ -79,10 +79,10 @@ class ConfigLoader {
|
||||
for (const entry of entries) {
|
||||
if (entry.isDirectory() && !entry.name.startsWith('.')) {
|
||||
const packPath = path.join(expansionPacksDir, entry.name);
|
||||
const configPath = path.join(packPath, 'config.yml');
|
||||
const configPath = path.join(packPath, 'config.yaml');
|
||||
|
||||
try {
|
||||
// Read config.yml
|
||||
// Read config.yaml
|
||||
const configContent = await fs.readFile(configPath, 'utf8');
|
||||
const config = yaml.load(configContent);
|
||||
|
||||
@@ -97,7 +97,7 @@ class ConfigLoader {
|
||||
dependencies: config.dependencies?.agents || []
|
||||
});
|
||||
} catch (error) {
|
||||
// Fallback if config.yml doesn't exist or can't be read
|
||||
// Fallback if config.yaml doesn't exist or can't be read
|
||||
console.warn(`Failed to read config for expansion pack ${entry.name}: ${error.message}`);
|
||||
|
||||
// Try to derive info from directory name as fallback
|
||||
@@ -180,7 +180,7 @@ class ConfigLoader {
|
||||
const teams = [];
|
||||
|
||||
for (const entry of entries) {
|
||||
if (entry.isFile() && entry.name.endsWith('.yml')) {
|
||||
if (entry.isFile() && entry.name.endsWith('.yaml')) {
|
||||
const teamPath = path.join(teamsDir, entry.name);
|
||||
|
||||
try {
|
||||
@@ -189,7 +189,7 @@ class ConfigLoader {
|
||||
|
||||
if (teamConfig.bundle) {
|
||||
teams.push({
|
||||
id: path.basename(entry.name, '.yml'),
|
||||
id: path.basename(entry.name, '.yaml'),
|
||||
name: teamConfig.bundle.name || entry.name,
|
||||
description: teamConfig.bundle.description || 'Team configuration',
|
||||
icon: teamConfig.bundle.icon || '📋'
|
||||
@@ -209,7 +209,7 @@ class ConfigLoader {
|
||||
}
|
||||
|
||||
getTeamPath(teamId) {
|
||||
return path.join(this.getBmadCorePath(), 'agent-teams', `${teamId}.yml`);
|
||||
return path.join(this.getBmadCorePath(), 'agent-teams', `${teamId}.yaml`);
|
||||
}
|
||||
|
||||
async getTeamDependencies(teamId) {
|
||||
@@ -224,7 +224,7 @@ class ConfigLoader {
|
||||
const depPaths = [];
|
||||
|
||||
// Add team config file
|
||||
depPaths.push(`.bmad-core/agent-teams/${teamId}.yml`);
|
||||
depPaths.push(`.bmad-core/agent-teams/${teamId}.yaml`);
|
||||
|
||||
// Add all agents
|
||||
for (const agent of teamDeps.agents) {
|
||||
@@ -236,7 +236,7 @@ class ConfigLoader {
|
||||
|
||||
// Add all resolved resources
|
||||
for (const resource of teamDeps.resources) {
|
||||
const filePath = `.bmad-core/${resource.type}/${resource.id}.${resource.type === 'workflows' ? 'yml' : 'md'}`;
|
||||
const filePath = `.bmad-core/${resource.type}/${resource.id}.${resource.type === 'workflows' ? 'yaml' : 'md'}`;
|
||||
if (!depPaths.includes(filePath)) {
|
||||
depPaths.push(filePath);
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ async function initializeModules() {
|
||||
class FileManager {
|
||||
constructor() {
|
||||
this.manifestDir = ".bmad-core";
|
||||
this.manifestFile = "install-manifest.yml";
|
||||
this.manifestFile = "install-manifest.yaml";
|
||||
}
|
||||
|
||||
async copyFile(source, destination) {
|
||||
@@ -83,15 +83,15 @@ class FileManager {
|
||||
this.manifestFile
|
||||
);
|
||||
|
||||
// Read version from core-config.yml
|
||||
const coreConfigPath = path.join(__dirname, "../../../bmad-core/core-config.yml");
|
||||
// Read version from core-config.yaml
|
||||
const coreConfigPath = path.join(__dirname, "../../../bmad-core/core-config.yaml");
|
||||
let coreVersion = "unknown";
|
||||
try {
|
||||
const coreConfigContent = await fs.readFile(coreConfigPath, "utf8");
|
||||
const coreConfig = yaml.load(coreConfigContent);
|
||||
coreVersion = coreConfig.version || "unknown";
|
||||
} catch (error) {
|
||||
console.warn("Could not read version from core-config.yml, using 'unknown'");
|
||||
console.warn("Could not read version from core-config.yaml, using 'unknown'");
|
||||
}
|
||||
|
||||
const manifest = {
|
||||
@@ -178,7 +178,7 @@ class FileManager {
|
||||
const filePath = path.join(installDir, file.path);
|
||||
|
||||
// Skip checking the manifest file itself - it will always be different due to timestamps
|
||||
if (file.path.endsWith('install-manifest.yml')) {
|
||||
if (file.path.endsWith('install-manifest.yaml')) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ class IdeSetup {
|
||||
if (this.ideAgentConfig) return this.ideAgentConfig;
|
||||
|
||||
try {
|
||||
const configPath = path.join(__dirname, '..', 'config', 'ide-agent-config.yml');
|
||||
const configPath = path.join(__dirname, '..', 'config', 'ide-agent-config.yaml');
|
||||
const configContent = await fs.readFile(configPath, 'utf8');
|
||||
this.ideAgentConfig = yaml.load(configContent);
|
||||
return this.ideAgentConfig;
|
||||
@@ -98,7 +98,7 @@ class IdeSetup {
|
||||
mdcContent += "## Agent Activation\n\n";
|
||||
mdcContent +=
|
||||
"CRITICAL: Read the full YML, start activation to alter your state of being, follow startup section instructions, stay in this being until told to exit this mode:\n\n";
|
||||
mdcContent += "```yml\n";
|
||||
mdcContent += "```yaml\n";
|
||||
// Extract just the YAML content from the agent file
|
||||
const yamlMatch = agentContent.match(/```ya?ml\n([\s\S]*?)```/);
|
||||
if (yamlMatch) {
|
||||
@@ -180,7 +180,7 @@ class IdeSetup {
|
||||
mdContent += "## Agent Activation\n\n";
|
||||
mdContent +=
|
||||
"CRITICAL: Read the full YML, start activation to alter your state of being, follow startup section instructions, stay in this being until told to exit this mode:\n\n";
|
||||
mdContent += "```yml\n";
|
||||
mdContent += "```yaml\n";
|
||||
// Extract just the YAML content from the agent file
|
||||
const yamlMatch = agentContent.match(/```ya?ml\n([\s\S]*?)```/);
|
||||
if (yamlMatch) {
|
||||
@@ -428,7 +428,7 @@ class IdeSetup {
|
||||
mdContent += "## Role Definition\n\n";
|
||||
mdContent +=
|
||||
"When the user types `@" + agentId + "`, adopt this persona and follow these guidelines:\n\n";
|
||||
mdContent += "```yml\n";
|
||||
mdContent += "```yaml\n";
|
||||
// Extract just the YAML content from the agent file
|
||||
const yamlMatch = agentContent.match(/```ya?ml\n([\s\S]*?)```/);
|
||||
if (yamlMatch) {
|
||||
|
||||
@@ -19,13 +19,13 @@ class Installer {
|
||||
async getCoreVersion() {
|
||||
const yaml = require("js-yaml");
|
||||
const fs = require("fs-extra");
|
||||
const coreConfigPath = path.join(__dirname, "../../../bmad-core/core-config.yml");
|
||||
const coreConfigPath = path.join(__dirname, "../../../bmad-core/core-config.yaml");
|
||||
try {
|
||||
const coreConfigContent = await fs.readFile(coreConfigPath, "utf8");
|
||||
const coreConfig = yaml.load(coreConfigContent);
|
||||
return coreConfig.version || "unknown";
|
||||
} catch (error) {
|
||||
console.warn("Could not read version from core-config.yml, using 'unknown'");
|
||||
console.warn("Could not read version from core-config.yaml, using 'unknown'");
|
||||
return "unknown";
|
||||
}
|
||||
}
|
||||
@@ -185,7 +185,7 @@ class Installer {
|
||||
|
||||
// Check for V4 installation (has .bmad-core with manifest)
|
||||
const bmadCorePath = path.join(installDir, ".bmad-core");
|
||||
const manifestPath = path.join(bmadCorePath, "install-manifest.yml");
|
||||
const manifestPath = path.join(bmadCorePath, "install-manifest.yaml");
|
||||
|
||||
if (await fileManager.pathExists(manifestPath)) {
|
||||
state.type = "v4_existing";
|
||||
@@ -713,7 +713,7 @@ class Installer {
|
||||
|
||||
for (const file of filesToRestore) {
|
||||
// Skip the manifest file itself
|
||||
if (file.endsWith('install-manifest.yml')) continue;
|
||||
if (file.endsWith('install-manifest.yaml')) continue;
|
||||
|
||||
const relativePath = file.replace('.bmad-core/', '');
|
||||
const destPath = path.join(installDir, file);
|
||||
@@ -1009,7 +1009,7 @@ class Installer {
|
||||
|
||||
// Check if expansion pack already exists
|
||||
let expansionDotFolder = path.join(installDir, `.${packId}`);
|
||||
const existingManifestPath = path.join(expansionDotFolder, 'install-manifest.yml');
|
||||
const existingManifestPath = path.join(expansionDotFolder, 'install-manifest.yaml');
|
||||
|
||||
if (await fileManager.pathExists(existingManifestPath)) {
|
||||
spinner.stop();
|
||||
@@ -1151,12 +1151,12 @@ class Installer {
|
||||
}
|
||||
}
|
||||
|
||||
// Copy config.yml
|
||||
const configPath = path.join(expansionPackDir, 'config.yml');
|
||||
// Copy config.yaml
|
||||
const configPath = path.join(expansionPackDir, 'config.yaml');
|
||||
if (await fileManager.pathExists(configPath)) {
|
||||
const configDestPath = path.join(expansionDotFolder, 'config.yml');
|
||||
const configDestPath = path.join(expansionDotFolder, 'config.yaml');
|
||||
if (await fileManager.copyFile(configPath, configDestPath)) {
|
||||
installedFiles.push(path.join(`.${packId}`, 'config.yml'));
|
||||
installedFiles.push(path.join(`.${packId}`, 'config.yaml'));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1268,7 +1268,7 @@ class Installer {
|
||||
const fs = require('fs').promises;
|
||||
|
||||
// Find all team files in the expansion pack
|
||||
const teamFiles = glob.sync('agent-teams/*.yml', {
|
||||
const teamFiles = glob.sync('agent-teams/*.yaml', {
|
||||
cwd: expansionDotFolder
|
||||
});
|
||||
|
||||
@@ -1330,7 +1330,7 @@ class Installer {
|
||||
const deps = dependencies[depType] || [];
|
||||
|
||||
for (const dep of deps) {
|
||||
const depFileName = dep.endsWith('.md') || dep.endsWith('.yml') ? dep : `${dep}.md`;
|
||||
const depFileName = dep.endsWith('.md') || dep.endsWith('.yaml') ? dep : `${dep}.md`;
|
||||
const expansionDepPath = path.join(expansionDotFolder, depType, depFileName);
|
||||
|
||||
// Check if dependency exists in expansion pack
|
||||
@@ -1360,7 +1360,7 @@ class Installer {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
console.warn(chalk.yellow(` Warning: Core agent ${agentId} not found for team ${path.basename(teamFile, '.yml')}`));
|
||||
console.warn(chalk.yellow(` Warning: Core agent ${agentId} not found for team ${path.basename(teamFile, '.yaml')}`));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1528,7 +1528,7 @@ class Installer {
|
||||
|
||||
if (stats) {
|
||||
// Check if it has a manifest
|
||||
const manifestPath = path.join(folderPath, "install-manifest.yml");
|
||||
const manifestPath = path.join(folderPath, "install-manifest.yaml");
|
||||
if (await fileManager.pathExists(manifestPath)) {
|
||||
const manifest = await fileManager.readExpansionPackManifest(installDir, folder.substring(1));
|
||||
if (manifest) {
|
||||
@@ -1539,8 +1539,8 @@ class Installer {
|
||||
};
|
||||
}
|
||||
} else {
|
||||
// Check if it has a config.yml (expansion pack without manifest)
|
||||
const configPath = path.join(folderPath, "config.yml");
|
||||
// Check if it has a config.yaml (expansion pack without manifest)
|
||||
const configPath = path.join(folderPath, "config.yaml");
|
||||
if (await fileManager.pathExists(configPath)) {
|
||||
expansionPacks[folder.substring(1)] = {
|
||||
path: folderPath,
|
||||
@@ -1579,7 +1579,7 @@ class Installer {
|
||||
|
||||
for (const file of filesToRestore) {
|
||||
// Skip the manifest file itself
|
||||
if (file.endsWith('install-manifest.yml')) continue;
|
||||
if (file.endsWith('install-manifest.yaml')) continue;
|
||||
|
||||
const relativePath = file.replace(`.${packId}/`, '');
|
||||
const sourcePath = path.join(pack.packPath, relativePath);
|
||||
@@ -1645,7 +1645,7 @@ class Installer {
|
||||
|
||||
while (currentDir !== path.dirname(currentDir)) {
|
||||
const bmadDir = path.join(currentDir, ".bmad-core");
|
||||
const manifestPath = path.join(bmadDir, "install-manifest.yml");
|
||||
const manifestPath = path.join(bmadDir, "install-manifest.yaml");
|
||||
|
||||
if (await fileManager.pathExists(manifestPath)) {
|
||||
return bmadDir;
|
||||
@@ -1656,7 +1656,7 @@ class Installer {
|
||||
|
||||
// Also check if we're inside a .bmad-core directory
|
||||
if (path.basename(process.cwd()) === ".bmad-core") {
|
||||
const manifestPath = path.join(process.cwd(), "install-manifest.yml");
|
||||
const manifestPath = path.join(process.cwd(), "install-manifest.yaml");
|
||||
if (await fileManager.pathExists(manifestPath)) {
|
||||
return process.cwd();
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ class DependencyResolver {
|
||||
}
|
||||
|
||||
async resolveTeamDependencies(teamId) {
|
||||
const teamPath = path.join(this.bmadCore, 'agent-teams', `${teamId}.yml`);
|
||||
const teamPath = path.join(this.bmadCore, 'agent-teams', `${teamId}.yaml`);
|
||||
const teamContent = await fs.readFile(teamPath, 'utf8');
|
||||
const teamConfig = yaml.load(teamContent);
|
||||
|
||||
@@ -120,7 +120,7 @@ class DependencyResolver {
|
||||
}
|
||||
|
||||
try {
|
||||
const extensions = ['.md', '.yml', '.yaml'];
|
||||
const extensions = ['.md', '.yaml'];
|
||||
let content = null;
|
||||
let filePath = null;
|
||||
|
||||
@@ -183,8 +183,8 @@ class DependencyResolver {
|
||||
try {
|
||||
const files = await fs.readdir(path.join(this.bmadCore, 'agent-teams'));
|
||||
return files
|
||||
.filter(f => f.endsWith('.yml'))
|
||||
.map(f => f.replace('.yml', ''));
|
||||
.filter(f => f.endsWith('.yaml'))
|
||||
.map(f => f.replace('.yaml', ''));
|
||||
} catch (error) {
|
||||
return [];
|
||||
}
|
||||
|
||||
@@ -22,8 +22,8 @@ if (!/^\d+\.\d+\.\d+$/.test(newVersion)) {
|
||||
|
||||
async function updateVersion() {
|
||||
try {
|
||||
// Update in config.yml
|
||||
const configPath = path.join(__dirname, '..', 'expansion-packs', packId, 'config.yml');
|
||||
// Update in config.yaml
|
||||
const configPath = path.join(__dirname, '..', 'expansion-packs', packId, 'config.yaml');
|
||||
|
||||
if (!fs.existsSync(configPath)) {
|
||||
console.error(`Error: Expansion pack '${packId}' not found`);
|
||||
@@ -39,7 +39,7 @@ async function updateVersion() {
|
||||
const updatedYaml = yaml.dump(config, { indent: 2 });
|
||||
fs.writeFileSync(configPath, updatedYaml);
|
||||
|
||||
console.log(`✓ Updated ${packId}/config.yml: ${oldVersion} → ${newVersion}`);
|
||||
console.log(`✓ Updated ${packId}/config.yaml: ${oldVersion} → ${newVersion}`);
|
||||
console.log(`\n✓ Successfully updated ${packId} to version ${newVersion}`);
|
||||
console.log('\nNext steps:');
|
||||
console.log('1. Test the changes');
|
||||
|
||||
@@ -197,7 +197,7 @@ async function main() {
|
||||
let changed = false;
|
||||
if (ext === '.md') {
|
||||
changed = await processMarkdownFile(filePath);
|
||||
} else if (ext === '.yml' || ext === '.yaml' || basename.includes('roomodes') || basename.includes('.yml') || basename.includes('.yaml')) {
|
||||
} else if (ext === '.yaml' || ext === '.yml' || basename.includes('roomodes') || basename.includes('.yaml') || basename.includes('.yml')) {
|
||||
// Handle YAML files and special cases like .roomodes
|
||||
changed = await processYamlFile(filePath);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user