优化下载打包
This commit is contained in:
@@ -8,7 +8,7 @@ module.exports = {
|
|||||||
let id = request.query?.id
|
let id = request.query?.id
|
||||||
dbUtils.detail({table: 'node_custom_config', id}).then(info => {
|
dbUtils.detail({table: 'node_custom_config', id}).then(info => {
|
||||||
if (info?.id) {
|
if (info?.id) {
|
||||||
let path = `${info.dist || `../zips/${id}`}`, zipPath = `../zips/${info.id}.zip`
|
let path = `${info.dist || `../zips/${info.name}v${info.version}`}`, zipPath = `../zips/${info.id}.zip`
|
||||||
fse.removeSync(zipPath)
|
fse.removeSync(zipPath)
|
||||||
fse.pathExists(path, (err, exists) => {
|
fse.pathExists(path, (err, exists) => {
|
||||||
console.log(`${path}=========>${exists}`)
|
console.log(`${path}=========>${exists}`)
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ module.exports = {
|
|||||||
mp: 'dvcp_v2_wxmp'
|
mp: 'dvcp_v2_wxmp'
|
||||||
}[info.type] || {}
|
}[info.type] || {}
|
||||||
const path = `../${buildPath}`,
|
const path = `../${buildPath}`,
|
||||||
{dist = `../zips/${id}`} = info
|
{dist = `../zips/${info.name}v${info.version}`} = info
|
||||||
Promise.all([
|
Promise.all([
|
||||||
execute(`./shell/update.sh ${info.name} ${path}`),
|
execute(`./shell/update.sh ${info.name} ${path}`),
|
||||||
db.query(sql)
|
db.query(sql)
|
||||||
|
|||||||
Reference in New Issue
Block a user