打包脚本集中管理
This commit is contained in:
@@ -16,17 +16,17 @@ module.exports = {
|
||||
wxwork: 'base-wxcp',
|
||||
mp: 'dvcp_v2_wxmp'
|
||||
}[info.type] || {}
|
||||
const path = `/home/deploy/node-service/${buildPath}`,
|
||||
const path = `/home/deploy/node_deploy/${buildPath}`,
|
||||
{dist} = info
|
||||
Promise.all([
|
||||
execute(`/root/node-service/update.sh ${info.name} ${path}`),
|
||||
execute(`./shell/update.sh ${info.name} ${path}`),
|
||||
db.query(sql)
|
||||
]).then(() => setTimeout(() => {
|
||||
response.send({code: 0})
|
||||
}, 1000))
|
||||
execute(`cd ${path}&&npm run apps&&node bin/pages.js ${id}&&npm run build`)
|
||||
.then(() => fse.emptyDir(dist))
|
||||
.then(() => execute(`/root/node-service/move.sh ${info.type} ${path} ${dist}`))
|
||||
.then(() => execute(`./shell/move.sh ${info.type} ${path} ${dist}`))
|
||||
.then(() => {
|
||||
return db.query(`update node_custom_config set download='${dayjs().format("YYYY-MM-DD HH:mm:ss")}',error='' where ${uniCon}`)
|
||||
}).catch(err => {
|
||||
|
||||
Reference in New Issue
Block a user