mirror of
https://github.com/APIParkLab/APIPark.git
synced 2026-06-14 20:41:15 +08:00
test
This commit is contained in:
+14
-14
@@ -5,19 +5,19 @@ BRANCH=$(git rev-parse --abbrev-ref HEAD)
|
||||
|
||||
# 如果是从 feature 分支推送
|
||||
echo $BRANCH
|
||||
# if [[ $BRANCH == feature/* || $BRANCH == fix/* ]]; then
|
||||
# # 获取远程仓库列表
|
||||
# REMOTES=$(git remote)
|
||||
if [[ $BRANCH == feature/* || $BRANCH == fix/* ]]; then
|
||||
# 获取远程仓库列表
|
||||
REMOTES=$(git remote)
|
||||
|
||||
# # 检查是否存在 gitlab 和 github 远程仓库
|
||||
# if echo "$REMOTES" | grep -q "gitlab"; then
|
||||
# echo "Pushing to GitLab..."
|
||||
# git push gitlab $BRANCH
|
||||
# fi
|
||||
# 检查是否存在 gitlab 和 github 远程仓库
|
||||
if echo "$REMOTES" | grep -q "gitlab"; then
|
||||
echo "Pushing $BRANCH to GitLab..."
|
||||
git push gitlab $BRANCH
|
||||
fi
|
||||
|
||||
# # 只有在明确要求时才推送到 GitHub
|
||||
# if echo "$REMOTES" | grep -q "github"; then
|
||||
# echo "Pushing to GitHub..."
|
||||
# git push github $BRANCH
|
||||
# fi
|
||||
# fi
|
||||
# 只有在明确要求时才推送到 GitHub
|
||||
if echo "$REMOTES" | grep -q "github"; then
|
||||
echo "Pushing $BRANCH to GitHub..."
|
||||
git push github $BRANCH
|
||||
fi
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user