feat(cli): split commit and release into target-based workflows

This commit is contained in:
2026-05-10 10:01:09 +00:00
parent 738fbaa64f
commit 0e27d54ad2
22 changed files with 1938 additions and 1057 deletions
+15 -2
View File
@@ -17,8 +17,9 @@ const commandSummaries: ICommandHelpSummary[] = [
{
name: "commit",
description:
"Create semantic commits or generate read-only commit recommendations",
"Analyze changes and create semantic source commits",
},
{ name: "release", description: "Create versioned releases from pending changelog entries" },
{ name: "format", description: "Plan or apply project formatting changes" },
{ name: "config", description: "Read and change .smartconfig.json settings" },
{ name: "services", description: "Manage or configure development services" },
@@ -68,7 +69,8 @@ export let run = async (argvArg: any = {}) => {
message: "What would you like to do?",
default: "commit",
choices: [
{ name: "Commit changes (semantic versioning)", value: "commit" },
{ name: "Commit changes", value: "commit" },
{ name: "Release pending changes", value: "release" },
{ name: "Format project files", value: "format" },
{ name: "Configure release settings", value: "config" },
{ name: "Create from template", value: "template" },
@@ -86,6 +88,11 @@ export let run = async (argvArg: any = {}) => {
await modCommit.run({ _: ["commit"] });
break;
}
case "release": {
const modRelease = await import("../mod_release/index.js");
await modRelease.run({ _: ["release"] });
break;
}
case "format": {
const modFormat = await import("../mod_format/index.js");
await modFormat.run({ interactive: true });
@@ -186,6 +193,7 @@ export async function showHelp(
console.log(" gitzone help commit");
console.log(" gitzone config show --json");
console.log(" gitzone commit recommend --json");
console.log(" gitzone release --plan");
console.log(" gitzone format plan --json");
console.log(" gitzone services set mongodb,minio");
console.log("");
@@ -203,6 +211,11 @@ async function showCommandHelp(
modCommit.showHelp(mode);
return true;
}
case "release": {
const modRelease = await import("../mod_release/index.js");
modRelease.showHelp(mode);
return true;
}
case "config": {
const modConfig = await import("../mod_config/index.js");
modConfig.showHelp(mode);