优化脚本
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user