定制项目打包接口完成
This commit is contained in:
@@ -16,7 +16,7 @@ module.exports = {
|
|||||||
mp: ''
|
mp: ''
|
||||||
}[info.type] || {}
|
}[info.type] || {}
|
||||||
const path = `/home/deploy/node-service/${buildPath}`,
|
const path = `/home/deploy/node-service/${buildPath}`,
|
||||||
dest = `/home/deploy/node-service/customZips/${id}/`
|
{dist} = info
|
||||||
Promise.all([
|
Promise.all([
|
||||||
execute(`/root/node-service/update.sh ${info.name} ${path}`),
|
execute(`/root/node-service/update.sh ${info.name} ${path}`),
|
||||||
db.query(sql)
|
db.query(sql)
|
||||||
@@ -24,8 +24,8 @@ module.exports = {
|
|||||||
response.send({code: 0})
|
response.send({code: 0})
|
||||||
}, 5000))
|
}, 5000))
|
||||||
execute(`cd ${path}&&npm run apps&&node bin/pages.js ${id}&&npm run build`)
|
execute(`cd ${path}&&npm run apps&&node bin/pages.js ${id}&&npm run build`)
|
||||||
.then(() => fse.emptyDir(dest))
|
.then(() => fse.emptyDir(dist))
|
||||||
.then(() => execute(`/root/node-service/move.sh ${info.type} ${path} ${dest}`))
|
.then(() => execute(`/root/node-service/move.sh ${info.type} ${path} ${dist}`))
|
||||||
.then(() => {
|
.then(() => {
|
||||||
return db.query(`update node_custom_config set download='${dayjs().format("YYYY-MM-DD HH:mm:ss")}',error='' where ${uniCon}`)
|
return db.query(`update node_custom_config set download='${dayjs().format("YYYY-MM-DD HH:mm:ss")}',error='' where ${uniCon}`)
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
|
|||||||
Reference in New Issue
Block a user