提交 d8346ee2 authored 作者: Andy's avatar Andy

123

上级 8650bba4
...@@ -39,7 +39,6 @@ cd $install_dir ...@@ -39,7 +39,6 @@ cd $install_dir
# esac # esac
# } # }
echo_content() { echo_content() {
local color="$1" local color="$1"
local text="$2" local text="$2"
...@@ -59,7 +58,6 @@ echo_content() { ...@@ -59,7 +58,6 @@ echo_content() {
esac esac
} }
# 更新分支函数(带更新前恢复) # 更新分支函数(带更新前恢复)
update_branch() { update_branch() {
local repo_url=$1 local repo_url=$1
...@@ -142,23 +140,47 @@ fetch_git_platsvr() { ...@@ -142,23 +140,47 @@ fetch_git_platsvr() {
done done
} }
# fetch_git_platweb() {
# REPO_URL="git@git.wkwork.xyz:LaunchDeploy/wk_gameplat_web.git"
# BASE_DIR="./web"
# MAX_RETRY=3 # 最大重试次数
# BRANCHES=(
# $GamePlat_ranch
# )
# # 主循环
# for BRANCH in "${BRANCHES[@]}"; do
# TARGET_DIR="$BASE_DIR/$BRANCH"
# if [ -d "$TARGET_DIR/.git" ]; then
# update_branch "$REPO_URL" "$BRANCH" "$TARGET_DIR"
# else
# clone_branch "$REPO_URL" "$BRANCH" "$TARGET_DIR"
# fi
# done
# }
Web_Repo_Url="git@git.wkwork.xyz:LaunchDeploy/wk_gameplat_web.git"
Web_Base_Dir="./web"
Web_Branches=(
$GamePlat_ranch
)
fetch_git_platweb() { fetch_git_platweb() {
REPO_URL="git@git.wkwork.xyz:LaunchDeploy/wk_gameplat_web.git" local tmp_web_repo_url=$1
BASE_DIR="./web" local tmp_base_dir=$2
MAX_RETRY=3 # 最大重试次数 local tmp_branches=$3
BRANCHES=(
$GamePlat_ranch
)
# 主循环 # 主循环
for BRANCH in "${BRANCHES[@]}"; do for branch in "${tmp_branches[@]}"; do
TARGET_DIR="$BASE_DIR/$BRANCH" tmp_target_dir="$tmp_base_dir/$branch"
if [ -d "$TARGET_DIR/.git" ]; then if [ -d "$tmp_target_dir/.git" ]; then
update_branch "$REPO_URL" "$BRANCH" "$TARGET_DIR" update_branch "$tmp_web_repo_url" "$branch" "$tmp_target_dir"
else else
clone_branch "$REPO_URL" "$BRANCH" "$TARGET_DIR" clone_branch "$tmp_web_repo_url" "$branch" "$tmp_target_dir"
fi fi
done done
} }
...@@ -206,7 +228,7 @@ MENU_ITEMS=( ...@@ -206,7 +228,7 @@ MENU_ITEMS=(
MENU_ACTIONS=( MENU_ACTIONS=(
"bash <(curl -sSL http://oauth2:QFF_7BNyjHsq_Zvfsfut@git.wkwork.xyz/LaunchDeploy/install/raw/master/gitaccount.sh) check_gitaccount" "bash <(curl -sSL http://oauth2:QFF_7BNyjHsq_Zvfsfut@git.wkwork.xyz/LaunchDeploy/install/raw/master/gitaccount.sh) check_gitaccount"
"fetch_git_platsvr" "fetch_git_platsvr"
"fetch_git_platweb" "fetch_git_platweb Web_Repo_Url Web_Base_Dir Web_Branches"
"fetch_git_gameweb" "fetch_git_gameweb"
"run_docker" "run_docker"
"run_service" "run_service"
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论