Showing
3 changed files
with
8 additions
and
3 deletions
| ... | @@ -12,13 +12,14 @@ | ... | @@ -12,13 +12,14 @@ |
| 12 | 12 | ||
| 13 | # 你也可以定义多个不同的组合: | 13 | # 你也可以定义多个不同的组合: |
| 14 | # upload_array=('dev' 'oa') # 仅开发和OA环境 | 14 | # upload_array=('dev' 'oa') # 仅开发和OA环境 |
| 15 | -upload_array=('oa' 'mituo' 'guanzong' 'baorong' 'taishan' 'xys') # 仅这三个环境 | 15 | +upload_array=('oa' 'mituo' 'guanzong' 'baorong' 'taishan' 'xys' 'zentea' 'behalo') # 仅这三个环境 |
| 16 | # upload_array=('all') # 所有环境 | 16 | # upload_array=('all') # 所有环境 |
| 17 | 17 | ||
| 18 | # 颜色定义 | 18 | # 颜色定义 |
| 19 | GREEN='\033[0;32m' | 19 | GREEN='\033[0;32m' |
| 20 | BLUE='\033[0;34m' | 20 | BLUE='\033[0;34m' |
| 21 | YELLOW='\033[1;33m' | 21 | YELLOW='\033[1;33m' |
| 22 | +RED='\033[0;31m' | ||
| 22 | NC='\033[0m' | 23 | NC='\033[0m' |
| 23 | 24 | ||
| 24 | echo -e "${BLUE}=== 自动部署脚本 ===${NC}" | 25 | echo -e "${BLUE}=== 自动部署脚本 ===${NC}" | ... | ... |
| ... | @@ -40,13 +40,14 @@ get_environment_name() { | ... | @@ -40,13 +40,14 @@ get_environment_name() { |
| 40 | "taishan") echo "泰山寺环境" ;; | 40 | "taishan") echo "泰山寺环境" ;; |
| 41 | "xys") echo "西园寺环境" ;; | 41 | "xys") echo "西园寺环境" ;; |
| 42 | "zentea") echo "Zentea环境" ;; | 42 | "zentea") echo "Zentea环境" ;; |
| 43 | + "behalo") echo "美乐爱觉环境" ;; | ||
| 43 | *) echo "" ;; | 44 | *) echo "" ;; |
| 44 | esac | 45 | esac |
| 45 | } | 46 | } |
| 46 | 47 | ||
| 47 | # 获取所有支持的环境列表 | 48 | # 获取所有支持的环境列表 |
| 48 | get_all_environments() { | 49 | get_all_environments() { |
| 49 | - echo "dev oa mituo guanzong baorong taishan xys zentea" | 50 | + echo "dev oa mituo guanzong baorong taishan xys zentea behalo" |
| 50 | } | 51 | } |
| 51 | 52 | ||
| 52 | # 显示帮助信息 | 53 | # 显示帮助信息 | ... | ... |
| ... | @@ -31,6 +31,8 @@ | ... | @@ -31,6 +31,8 @@ |
| 31 | "dec-xys": "ssh -p 12101 zhsy@oa.jcedu.org 'cd /home/www/f/custom_form && tar -xzvf dist.tar.gz && rm -rf dist.tar.gz'", | 31 | "dec-xys": "ssh -p 12101 zhsy@oa.jcedu.org 'cd /home/www/f/custom_form && tar -xzvf dist.tar.gz && rm -rf dist.tar.gz'", |
| 32 | "scp-zentea": "scp dist.tar.gz zentea@anxinchashi.com:/data/www/zentea/f/custom_form", | 32 | "scp-zentea": "scp dist.tar.gz zentea@anxinchashi.com:/data/www/zentea/f/custom_form", |
| 33 | "dec-zentea": "ssh zentea@anxinchashi.com 'cd /data/www/zentea/f/custom_form && tar -xzvf dist.tar.gz && rm -rf dist.tar.gz'", | 33 | "dec-zentea": "ssh zentea@anxinchashi.com 'cd /data/www/zentea/f/custom_form && tar -xzvf dist.tar.gz && rm -rf dist.tar.gz'", |
| 34 | + "scp-behalo": "scp dist.tar.gz ipadbiz-inner:/opt/behalo/f", | ||
| 35 | + "dec-behalo": "ssh ipadbiz-inner 'cd /opt/behalo/f && tar -xzvf dist.tar.gz && rm -rf dist.tar.gz'", | ||
| 34 | "remove_tar": "rm -rf dist.tar.gz", | 36 | "remove_tar": "rm -rf dist.tar.gz", |
| 35 | "remove_dist": "rm -rf front", | 37 | "remove_dist": "rm -rf front", |
| 36 | "dev_upload": "npm run build_tar && npm run scp-dev && npm run dec-dev && npm run remove_tar && npm run remove_dist", | 38 | "dev_upload": "npm run build_tar && npm run scp-dev && npm run dec-dev && npm run remove_tar && npm run remove_dist", |
| ... | @@ -41,7 +43,8 @@ | ... | @@ -41,7 +43,8 @@ |
| 41 | "taishan_upload": "npm run build_tar && npm run scp-taishan && npm run dec-taishan && npm run remove_tar && npm run remove_dist", | 43 | "taishan_upload": "npm run build_tar && npm run scp-taishan && npm run dec-taishan && npm run remove_tar && npm run remove_dist", |
| 42 | "xys_upload": "npm run build_tar && npm run scp-xys && npm run dec-xys && npm run remove_tar && npm run remove_dist", | 44 | "xys_upload": "npm run build_tar && npm run scp-xys && npm run dec-xys && npm run remove_tar && npm run remove_dist", |
| 43 | "zentea_upload": "npm run build_tar && npm run scp-zentea && npm run dec-zentea && npm run remove_tar && npm run remove_dist", | 45 | "zentea_upload": "npm run build_tar && npm run scp-zentea && npm run dec-zentea && npm run remove_tar && npm run remove_dist", |
| 44 | - "all_upload": "npm run xys_upload && npm run oa_upload && npm run mituo_upload && npm run guanzong_upload && npm run baorong_upload && npm run taishan_upload" | 46 | + "behalo_upload": "npm run build_tar && npm run scp-behalo && npm run dec-behalo && npm run remove_tar && npm run remove_dist", |
| 47 | + "all_upload": "npm run xys_upload && npm run oa_upload && npm run mituo_upload && npm run guanzong_upload && npm run baorong_upload && npm run taishan_upload && npm run zentea_upload && npm run behalo_upload" | ||
| 45 | }, | 48 | }, |
| 46 | "dependencies": { | 49 | "dependencies": { |
| 47 | "@dedisuryadi/json-form-data": "^0.1.1", | 50 | "@dedisuryadi/json-form-data": "^0.1.1", | ... | ... |
-
Please register or login to post a comment