🐛 fix(vscode): 同一天再切发布分支自动编号 .2 / .3,不再报已存在
This commit is contained in:
1 parent
b77f2b1b63
commit
936097757b
3 files changed
+76
-42
No files matched your search
@@ -20,7 +20,7 @@ import {
|
||||
indexUnreleasedByMergePr,
|
||||
listReleaseBranches,
|
||||
listUnreleasedCommits,
|
||||
todayReleaseBranch,
|
||||
nextReleaseBranch,
|
||||
} from '../../git/release'
|
||||
import { DEFAULT_WORKTREE_TEMPLATE, resolveWorktreeDir } from '../../git/worktreePath'
|
||||
import { triggerJenkinsBuild } from '../../jenkins/trigger'
|
||||
@@ -35,7 +35,7 @@ export async function handleReleaseStatus(panel: KanbanWebviewPanel): Promise<vo
|
||||
const base = {
|
||||
type: 'release/status' as const,
|
||||
devBranch: s.devBranch,
|
||||
nextBranch: todayReleaseBranch(s.releaseBranchPrefix),
|
||||
nextBranch: nextReleaseBranch(s.releaseBranchPrefix, []),
|
||||
running: panel.releaseRunning,
|
||||
jenkinsConfigured: s.jenkinsJob.length > 0,
|
||||
}
|
||||
@@ -45,7 +45,7 @@ export async function handleReleaseStatus(panel: KanbanWebviewPanel): Promise<vo
|
||||
}
|
||||
try {
|
||||
const st = await getReleaseStatus({ cwd: root, devBranch: s.devBranch, prefix: s.releaseBranchPrefix })
|
||||
panel.postMessage({ ...base, current: st.current, unreleased: st.unreleased, unavailable: st.unavailable })
|
||||
panel.postMessage({ ...base, nextBranch: st.next, current: st.current, unreleased: st.unreleased, unavailable: st.unavailable })
|
||||
}
|
||||
catch (err) {
|
||||
const message = err instanceof Error ? err.message : String(err)
|
||||
@@ -88,8 +88,7 @@ export function handleReleaseCut(panel: KanbanWebviewPanel): Promise<void> {
|
||||
return runReleaseAction(panel, async () => {
|
||||
const root = requireRoot()
|
||||
const s = getSettings(panel.context)
|
||||
const branch = todayReleaseBranch(s.releaseBranchPrefix)
|
||||
const count = await cutRelease({ cwd: root, devBranch: s.devBranch, branch })
|
||||
const { branch, count } = await cutRelease({ cwd: root, devBranch: s.devBranch, prefix: s.releaseBranchPrefix })
|
||||
toast(panel, 'success', `已切发布分支 ${branch}(${count} 个提交)`)
|
||||
if (!s.jenkinsJob)
|
||||
return
|
||||
|
||||
Reference in new issue
Block a user