diff --git a/test/cli/handlers/contracts/bump.ts b/test/cli/handlers/contracts/bump.ts index f0a5073f..ba15e862 100644 --- a/test/cli/handlers/contracts/bump.ts +++ b/test/cli/handlers/contracts/bump.ts @@ -4,6 +4,7 @@ import { logger, printDivider, printHeader } from "utils"; interface ContractsBumpOptions { type: "major" | "minor" | "patch"; + description?: string; } /** @@ -47,17 +48,24 @@ export const contractsBump = async (options: ContractsBumpOptions) => { const changesetsDir = path.join(repoRoot, "contracts", ".changesets"); const changesetPath = path.join(changesetsDir, changesetName); - // Write changeset file - writeFileSync(changesetPath, bumpType); + // Write changeset file (bump type on first line, optional description on subsequent lines) + let changesetContent = bumpType; + if (options.description) { + changesetContent += `\n${options.description}`; + } + writeFileSync(changesetPath, changesetContent); logger.success(`Created changeset: ${changesetName}`); logger.info(` Type: ${bumpType.toUpperCase()}`); + if (options.description) { + logger.info(` Description: ${options.description}`); + } logger.info(` Path: ${changesetPath}`); logger.info(""); logger.info("📋 Next steps:"); logger.info(" 1. Commit this changeset file: git add contracts/.changesets/"); logger.info(" 2. Push your changes"); - logger.info(" 3. On merge to main, CI will process the changeset"); + logger.info(" 3. Before release, manually run the version bump GitHub Action to create a PR"); printDivider(); } catch (error) { diff --git a/test/cli/index.ts b/test/cli/index.ts index e203f56f..e05edd7c 100644 --- a/test/cli/index.ts +++ b/test/cli/index.ts @@ -401,10 +401,12 @@ contractsCommand .command("bump") .description("Create a changeset to declare a version bump for contract changes") .requiredOption("--type ", "Bump type: major, minor, or patch") + .option("--description ", "Optional description of the changes (added after first line)") .action(async (options: any) => { const { contractsBump } = await import("./handlers"); await contractsBump({ - type: options.type as "major" | "minor" | "patch" + type: options.type as "major" | "minor" | "patch", + description: options.description }); });