更新下载脚本
This commit is contained in:
@@ -6,13 +6,13 @@ module.exports = {
|
||||
execute: (request, response) => {
|
||||
let appid = request.query?.appid
|
||||
if (appid) {
|
||||
let path = `/root/node-service/wxmpZips/${appid}/`, zipPath = `../wxmpZips/${appid}.zip`
|
||||
let path = `/home/deploy/wxmpZips/${appid}/`, zipPath = `/home/deploy/wxmpZips/${appid}.zip`
|
||||
fse.removeSync(zipPath)
|
||||
fse.pathExists(path, (err, exists) => {
|
||||
console.log(`${path}=========>${exists}`)
|
||||
if (exists) {
|
||||
execute(`cd ${path}&&zip -r ${appid}.zip .`)
|
||||
.then(() => execute(`cd ${path}&&mv ${appid}.zip /root/node-service/wxmpZips`))
|
||||
.then(() => execute(`cd ${path}&&mv ${appid}.zip /home/deploy/wxmpZips`))
|
||||
.then(() => {
|
||||
console.log('压缩完成!')
|
||||
setTimeout(() => {
|
||||
|
||||
Reference in New Issue
Block a user