更新部署服务
This commit is contained in:
@@ -10,7 +10,7 @@ module.exports = {
|
||||
dbUtils.query(sql).then(res => {
|
||||
let info = res?.[0]
|
||||
if (info?.id) {
|
||||
let path = `zips/${info.id}/dist`, zipPath = `./zips/${info.id}.zip`
|
||||
let path = `${info.target}`, zipPath = `./zips/${info.id}.zip`
|
||||
fse.removeSync(zipPath)
|
||||
fse.pathExists(path, (err, exists) => {
|
||||
console.log(`${path}=========>${exists}`)
|
||||
|
||||
@@ -20,7 +20,7 @@ module.exports = {
|
||||
console.log(err)
|
||||
db.query(`update node_autodeploy set error='${err}' where id='${info.id}'`)
|
||||
})
|
||||
} else response.send({code: 1, err: "无法找到git信息"})
|
||||
} else response.send({code: 1, err: "无法找到部署工程"})
|
||||
}).catch(err => {
|
||||
console.log(err)
|
||||
response.send({code: 1, err: err.sqlMessage})
|
||||
|
||||
Reference in New Issue
Block a user