优化脚本
This commit is contained in:
@@ -16,8 +16,14 @@ module.exports = {
|
|||||||
response.send({code: 0})
|
response.send({code: 0})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
execute(`${info.updateShell}`).then(() => execute(`${info.libShell}`))
|
Promise.resolve(() => {
|
||||||
.then(() => {
|
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}'`)
|
db.query(`update node_autodeploy set download='${dayjs().format("YYYY-MM-DD HH:mm:ss")}',error='' where id='${info.id}'`)
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
console.log(err)
|
console.log(err)
|
||||||
|
|||||||
Reference in New Issue
Block a user