diff --git a/src/rest/autodeploy/getZip.js b/src/rest/autodeploy/getZip.js index 603d111..cecd78c 100644 --- a/src/rest/autodeploy/getZip.js +++ b/src/rest/autodeploy/getZip.js @@ -16,8 +16,14 @@ module.exports = { response.send({code: 0}) }) }) - execute(`${info.updateShell}`).then(() => execute(`${info.libShell}`)) - .then(() => { + Promise.resolve(() => { + if (!!info.type) { + let {type, zipPath, target} = info + return execute(`/root/node-service/build.sh ${type} ${zipPath} ${target}`) + } else { + return execute(`${info.updateShell}`).then(() => execute(`${info.libShell}`)) + } + }).then(() => { db.query(`update node_autodeploy set download='${dayjs().format("YYYY-MM-DD HH:mm:ss")}',error='' where id='${info.id}'`) }).catch(err => { console.log(err)