🐛 fix(vscode): 发布按钮状态检查不再跑全量文件比对
This commit is contained in:
1 parent
0214ca1ab5
commit
b5b2bda353
4 files changed
+15
-8
No files matched your search
@@ -154,8 +154,12 @@ export async function getReleaseStatus(o: { cwd: string, devBranch: string, pref
|
||||
const current = pickCurrentRelease(o.prefix, await remoteBranchNames(o.cwd, o.prefix))
|
||||
if (!current)
|
||||
return base
|
||||
const commits = await listUnreleasedCommits({ cwd: o.cwd, devBranch: o.devBranch, current })
|
||||
return { devBranch: o.devBranch, current, unreleased: commits.length }
|
||||
const count = await mustGit(
|
||||
o.cwd,
|
||||
['rev-list', '--count', '--right-only', '--cherry-pick', '--no-merges', unreleasedRange(current, o.devBranch)],
|
||||
'统计未发布提交失败',
|
||||
)
|
||||
return { devBranch: o.devBranch, current, unreleased: Number(count) }
|
||||
}
|
||||
|
||||
/** 新→旧;不 fetch,调用方自己决定何时刷新远端 */
|
||||
|
||||
Reference in new issue
Block a user