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