From a748c2575bf5e589c4d3a63617c39f76f8850589 Mon Sep 17 00:00:00 2001 From: aixianling Date: Fri, 18 Oct 2024 12:08:09 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BC=95=E5=85=A5expect=E5=BA=93=E5=88=B0?= =?UTF-8?q?=E5=AE=B9=E5=99=A8=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 2 ++ src/websocket/custom/getZip.js | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index da69fcc..9aa6cf0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,8 @@ FROM node:16 LABEL authors="kubbo" +RUN yum update -y && yum install -y expect + COPY . /app WORKDIR /app RUN npm i --registry=http://registry.npmmirror.com diff --git a/src/websocket/custom/getZip.js b/src/websocket/custom/getZip.js index 3d71b2c..b02ceed 100644 --- a/src/websocket/custom/getZip.js +++ b/src/websocket/custom/getZip.js @@ -104,8 +104,8 @@ const handleZip = (id, ws) => { const buildPath = { web: 'base-web', wxwork: 'base-wxcp', mp: 'dvcp_v2_wxmp' }[info.type] || {} - let path = `../${buildPath}`, {dist} = info - dist = dist || `../zips/${info.name}v${info.version || "1.0.0"}` + let path = `/${buildPath}`, {dist} = info + dist = dist || `/zips/${info.name}v${info.version || "1.0.0"}` Promise.all([startUpdateSql(), execute(`./shell/update.sh ${info.name} ${path}`, signal)]) .then(cmd => progress.set(30, info?.id)) .then(() => execute(`cd ${path}&&npm run apps&&node bin/pages.js ${id}&&npm run build`, signal))