Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
aixianling
2022-06-20 18:31:14 +08:00

View File

@@ -7,7 +7,6 @@ module.exports = {
method: "post",
execute: (request, response) => {
let id = request.query?.id, sql = `select * from node_autodeploy where id='${id}'`
db.query(sql).then(res => {
let info = res?.[0]
if (info?.id) {
@@ -15,8 +14,7 @@ module.exports = {
fse.emptydir(info.target, () => {
response.send({code: 0})
})
})
Promise.resolve(() => {
}).then(()=>{
if (!!info.type) {
let {type, zipPath, target, name} = info
return execute(`/root/node-service/update.sh ${name} ${zipPath}`).then(() => execute(`/root/node-service/build.sh ${type} ${zipPath} ${target}`))