mirror of
https://github.com/whyour/qinglong.git
synced 2026-07-01 04:40:38 +08:00
系统升级增加gitee源
This commit is contained in:
+7
-2
@@ -247,6 +247,11 @@ usage() {
|
||||
update_qinglong() {
|
||||
patch_version &>/dev/null
|
||||
|
||||
local mirror="github"
|
||||
local githubStatus=$(curl -s -m 3 -IL "https://github.com" | grep 200)
|
||||
if [ "$githubStatus" == "" ]; then
|
||||
mirror="gitee"
|
||||
fi
|
||||
export isFirstStartServer=false
|
||||
|
||||
local all_branch=$(git branch -a)
|
||||
@@ -255,7 +260,7 @@ update_qinglong() {
|
||||
primary_branch="${current_branch}"
|
||||
fi
|
||||
[[ -f $dir_root/package.json ]] && ql_depend_old=$(cat $dir_root/package.json)
|
||||
reset_romote_url ${dir_root} "https://github.com/whyour/qinglong.git" ${primary_branch}
|
||||
reset_romote_url ${dir_root} "https://${mirror}.com/whyour/qinglong.git" ${primary_branch}
|
||||
git_pull_scripts $dir_root ${primary_branch}
|
||||
|
||||
if [[ $exit_status -eq 0 ]]; then
|
||||
@@ -276,7 +281,7 @@ update_qinglong() {
|
||||
update_qinglong_static() {
|
||||
local no_restart="$1"
|
||||
local primary_branch="$2"
|
||||
local url="https://github.com/whyour/qinglong-static.git"
|
||||
local url="https://${mirror}.com/whyour/qinglong-static.git"
|
||||
if [[ -d ${ql_static_repo}/.git ]]; then
|
||||
reset_romote_url ${ql_static_repo} ${url} ${primary_branch}
|
||||
git_pull_scripts ${ql_static_repo} ${primary_branch}
|
||||
|
||||
Reference in New Issue
Block a user