优化脚本

This commit is contained in:
aixianling
2022-06-17 18:04:44 +08:00
parent 11e1a726ae
commit 9c9e249f56

View File

@@ -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)