From bd8c7ebecb428c0bbbfe1921c9612ee191042501 Mon Sep 17 00:00:00 2001 From: aixianling Date: Fri, 18 Oct 2024 10:24:59 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=9B=91=E5=90=AC=E6=9E=84?= =?UTF-8?q?=E5=BB=BA=E4=BB=BB=E5=8A=A1=E7=9A=84id=E8=8E=B7=E5=8F=96?= =?UTF-8?q?=E5=BC=82=E5=B8=B8=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/websocket/custom/getZip.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/websocket/custom/getZip.js b/src/websocket/custom/getZip.js index f0acc47..c1797ac 100644 --- a/src/websocket/custom/getZip.js +++ b/src/websocket/custom/getZip.js @@ -69,8 +69,8 @@ const handleZip = (id, ws) => { startUpdateSql() .then(() => progress.set(30, id)) .then(() => fse.emptyDir(dist || `../zips/${deploy}`)) - .then(() => http.get(`/view/devops/job/${buildConfig.task}/buildWithParameters`, {params: {token: buildConfig.token, pid: id, dist:deploy}})) - .then(() => http.get(`/view/devops/job/${buildConfig.task}/api/json`).then(res => res.data?.id || 1)) + .then(() => http.get(`/view/devops/job/${buildConfig.task}/buildWithParameters`, {params: {token: buildConfig.token, pid: id, dist: deploy}})) + .then(() => http.get(`/view/devops/job/${buildConfig.task}/api/json`).then(res => (res.data?.nextBuildNumber - 1) || 1)) .then(currentJob => new Promise((resolve, reject) => { jobs[id] = {task: buildConfig.task, build: currentJob} const timer = setInterval(() => {