From 11e1a726ae39e01c9318c62477d48f1300cf7c5c Mon Sep 17 00:00:00 2001 From: aixianling Date: Fri, 17 Jun 2022 17:46:30 +0800 Subject: [PATCH] root=>/home/deploy --- src/rest/autodeploy/download.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/rest/autodeploy/download.js b/src/rest/autodeploy/download.js index 7b3c876..1efb0a9 100644 --- a/src/rest/autodeploy/download.js +++ b/src/rest/autodeploy/download.js @@ -9,13 +9,13 @@ module.exports = { dbUtils.query(sql).then(res => { let info = res?.[0] if (info?.id) { - let path = `${info.target}`, zipPath = `../zips/${info.id}.zip` + let path = `${info.target}`, zipPath = `/home/deploy/node-service/zips/${info.id}.zip` fse.removeSync(zipPath) fse.pathExists(path, (err, exists) => { console.log(`${path}=========>${exists}`) if (exists) { execute(`cd ${path}&&zip -r ${info.id}.zip .`) - .then(() => execute(`cd ${path}&&mv ${info.id}.zip /root/node-service/zips`)) + .then(() => execute(`cd ${path}&&mv ${info.id}.zip /home/deploy/node-service/zips`)) .then(() => { console.log('压缩完成!') setTimeout(() => {