diff --git a/package.json b/package.json index 8472a3d..65e08a6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@dllcn/auto-deploy", - "version": "1.1.3", + "version": "1.1.4", "description": "自动部署脚本", "main": "upload.js", "scripts": { diff --git a/upload.js b/upload.js index ffaee12..c1bfa6a 100755 --- a/upload.js +++ b/upload.js @@ -9,17 +9,17 @@ const inquirer = require('inquirer') //命令行交互 const zipFile = require('compressing2') // 压缩zip const fs = require('fs') // nodejs内置文件模块 const path = require('path') // nodejs内置路径模块 -const CONFIG = require('./config') // 配置 +// const CONFIG = require('./config') // 配置 const SSH = new node_ssh(); -// let CONFIG -// try { -// CONFIG = require(`${pathHierarchy}deploy.config.js`) // 项目配置 -// } catch (error) { -// errorLog('请在项目根目录添加 deploy.config.js 配置文件, 参考说明文档中的配置') -// process.exit() //退出流程 -// } +let CONFIG +try { + CONFIG = require(`${pathHierarchy}deploy.config.js`) // 项目配置 +} catch (error) { + errorLog('请在项目根目录添加 deploy.config.js 配置文件, 参考说明文档中的配置') + process.exit() //退出流程 +} let config; // 用于保存 inquirer 命令行交互后选择正式|测试版的配置