@@ -16,8 +16,15 @@ function step(msg) {
1616/**
1717 * Pure-validation pipeline. Reusable from publish-stable / publish-channel.
1818 * Returns { coreJson, cliJson } for callers that need the parsed package.jsons.
19+ *
20+ * @param {{ channel?: boolean } } [options]
21+ * @param {boolean } [options.channel] — When true (publish-channel): regenerate
22+ * `reference/` and assert it matches git, but do not sync `SKILL.md` from the
23+ * temporary beta `package.json` version (repo skill stays aligned with stable).
1924 */
20- export async function runCheck ( ) {
25+ export async function runCheck ( options = { } ) {
26+ const channel = options . channel === true ;
27+
2128 step ( "pnpm install --frozen-lockfile" ) ;
2229 run ( "pnpm" , [ "install" , "--frozen-lockfile" ] ) ;
2330
@@ -30,16 +37,26 @@ export async function runCheck() {
3037 step ( "build bailian-cli-core" ) ;
3138 run ( "pnpm" , [ "--filter" , "bailian-cli-core" , "run" , "build" ] ) ;
3239
33- step ( "generate skill reference + sync SKILL.md version" ) ;
40+ step (
41+ channel
42+ ? "generate skill reference (channel: skip SKILL.md version sync)"
43+ : "generate skill reference + sync SKILL.md version" ,
44+ ) ;
3445 run ( "pnpm" , [ "--filter" , "bailian-cli" , "run" , "generate:reference" ] ) ;
35- run ( "pnpm" , [ "--filter" , "bailian-cli" , "run" , "sync:skill-version" ] ) ;
46+ if ( ! channel ) {
47+ run ( "pnpm" , [ "--filter" , "bailian-cli" , "run" , "sync:skill-version" ] ) ;
48+ }
3649
37- step ( "verify committed skill assets match generators" ) ;
50+ step (
51+ channel
52+ ? "verify committed reference/ matches generator"
53+ : "verify committed skill assets match generators" ,
54+ ) ;
3855 run ( "git" , [
3956 "diff" ,
4057 "--exit-code" ,
4158 "--" ,
42- "skills/bailian-cli/SKILL.md" ,
59+ ... ( channel ? [ ] : [ "skills/bailian-cli/SKILL.md" ] ) ,
4360 "skills/bailian-cli/reference/" ,
4461 ] ) ;
4562
0 commit comments