feat: Change the version in SKILL to an optional verification

This commit is contained in:
qcq01083097
2026-06-09 16:42:15 +08:00
parent 9742209c4c
commit 1544af1f44
2 changed files with 23 additions and 6 deletions
+22 -5
View File
@@ -16,8 +16,15 @@ function step(msg) {
/**
* Pure-validation pipeline. Reusable from publish-stable / publish-channel.
* Returns { coreJson, cliJson } for callers that need the parsed package.jsons.
*
* @param {{ channel?: boolean }} [options]
* @param {boolean} [options.channel] — When true (publish-channel): regenerate
* `reference/` and assert it matches git, but do not sync `SKILL.md` from the
* temporary beta `package.json` version (repo skill stays aligned with stable).
*/
export async function runCheck() {
export async function runCheck(options = {}) {
const channel = options.channel === true;
step("pnpm install --frozen-lockfile");
run("pnpm", ["install", "--frozen-lockfile"]);
@@ -30,16 +37,26 @@ export async function runCheck() {
step("build bailian-cli-core");
run("pnpm", ["--filter", "bailian-cli-core", "run", "build"]);
step("generate skill reference + sync SKILL.md version");
step(
channel
? "generate skill reference (channel: skip SKILL.md version sync)"
: "generate skill reference + sync SKILL.md version",
);
run("pnpm", ["--filter", "bailian-cli", "run", "generate:reference"]);
run("pnpm", ["--filter", "bailian-cli", "run", "sync:skill-version"]);
if (!channel) {
run("pnpm", ["--filter", "bailian-cli", "run", "sync:skill-version"]);
}
step("verify committed skill assets match generators");
step(
channel
? "verify committed reference/ matches generator"
: "verify committed skill assets match generators",
);
run("git", [
"diff",
"--exit-code",
"--",
"skills/bailian-cli/SKILL.md",
...(channel ? [] : ["skills/bailian-cli/SKILL.md"]),
"skills/bailian-cli/reference/",
]);
+1 -1
View File
@@ -66,7 +66,7 @@ try {
// pnpm pack resolves `workspace:*` to the in-tree version, so CLI tarball
// will depend on bailian-cli-core@<betaVersion> after this bump.
await runCheck();
await runCheck({ channel: true });
step(`idempotency: check ${betaVersion} against registry`);
const corePublished = npmViewExists(core.name, betaVersion);