update deploy

This commit is contained in:
2025-12-07 11:05:27 +08:00
parent eca7b42377
commit 8118daa4e2

View File

@@ -30,7 +30,7 @@ export const getPackageJson = (opts?: { version?: string; appKey?: string }) =>
return null;
}
const [user, appKey] = userAppArry;
return { basename, version, pkg: packageJson, user, appKey: appKey || opts?.appKey, app };
return { basename, version, pkg: packageJson, user, appKey: opts?.appKey || appKey, app };
} catch (error) {
return null;
}
@@ -52,7 +52,6 @@ const command = new Command('deploy')
let { version, key, yes, update, org, showBackend } = options;
const noCheck = !options.noCheck;
const dot = !!options.dot;
// 获取当前目录是否存在package.json, 如果有从package.json 获取 version 和basename
const pkgInfo = getPackageJson({ version, appKey: key });
if (!version && pkgInfo?.version) {
version = pkgInfo?.version || '';