ci(sdk-release): fix CLI package path handling

- Remove dist/ directory requirement from workflow (CLI files are in package root)
- Update bundle-cli-from-npm.js to use package root directly instead of package/dist

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
This commit is contained in:
mingholy.lmh 2026-02-05 22:06:08 +08:00
parent 20b54c78de
commit 39884cc6a1
2 changed files with 6 additions and 12 deletions

View file

@ -32,13 +32,13 @@ function main() {
);
}
const cliDistDir = join(cliPackagePath, 'dist');
const cliDistDir = cliPackagePath;
const sdkCliDistDir = join(sdkRoot, 'dist', 'cli');
// Verify CLI dist exists
// Verify CLI package exists
if (!existsSync(cliDistDir)) {
throw new Error(
`[sdk bundle] CLI dist not found at: ${cliDistDir}. ` +
`[sdk bundle] CLI package not found at: ${cliDistDir}. ` +
`Make sure the CLI package was downloaded and extracted correctly.`,
);
}
@ -55,7 +55,7 @@ function main() {
mkdirSync(sdkCliDistDir, { recursive: true });
console.log('[sdk bundle] Copying CLI from npm package...');
console.log(`[sdk bundle] Source: ${cliDistDir}`);
console.log(`[sdk bundle] Source: ${cliDistDir} (package root)`);
console.log(`[sdk bundle] Destination: ${sdkCliDistDir}`);
// Copy main CLI file