Explorar o código

新增脚本 用于同步代码

mafei hai 1 ano
pai
achega
0824815c37
Modificáronse 1 ficheiros con 42 adicións e 0 borrados
  1. 42 0
      docs/update_server.sh

+ 42 - 0
docs/update_server.sh

@@ -0,0 +1,42 @@
+#! /bin/bash
+
+region=$1 # 区域类型,决定切换哪个分支 thailand 或者test360
+source=/server/source # 服务器资源 用于更新最新的git代码地址
+serverBasePath=/data/server/server/bin1 # 服务器base地址,需要手动更换
+#git账号和密码
+usename="mf527" 
+password="Cdw19930527"
+
+echo enter source path
+if [ ! -d "$source" ]; 
+then
+    mkdir -p "$source"
+fi
+cd $source
+
+if [ ! -d "congkong" ]; 
+then 
+    git clone -b ${region} https://${usename}:${password}@gitee.com/wangwenfan/congkong.git
+fi
+
+cd congkong
+#git checkout $region
+
+git pull
+
+# 将主要脚本同步过去
+cp -rf ${source}/congkong/script/common ${serverBasePath}/script/common
+cp -rf ${source}/congkong/script/excel ${serverBasePath}/script/excel
+cp -rf ${source}/congkong/script/module ${serverBasePath}/script/module
+# 进入source地址 更新git
+
+## -- congkong
+##     -- script
+##       -- common
+##       -- excel
+##       -- module
+##     -- docs
+##     -- gm
+##     -- webServer
+
+## 复制git下面的代码 到 bin中 cp -rf