This commit is contained in:
scarqin
2024-12-18 17:37:20 +08:00
parent d6f6642271
commit 60a735b726
2 changed files with 1 additions and 29 deletions
-26
View File
@@ -1,26 +0,0 @@
#!/usr/bin/env sh
# 获取当前分支名
BRANCH=$(git rev-parse --abbrev-ref HEAD)
# 获取远程仓库列表
REMOTES=$(git remote)
# 检查是否存在 gitlab 远程仓库
if ! echo "$REMOTES" | grep -q "gitlab"; then
echo "Error: GitLab remote repository not found"
exit 1
fi
echo "Pushing $BRANCH to GitLab..."
# 如果存在 github 远程仓库,推送到 GitHub
if echo "$REMOTES" | grep -q "github"; then
echo "Pushing $BRANCH to GitHub..."
git push github $BRANCH
fi
git push gitlab $BRANCH
# 防止 push 触发狗子
exit 0
+1 -3
View File
@@ -13,8 +13,7 @@
"serve:remotes": "lerna run serve --scope=remote --parallel",
"dev": "lerna run dev --scope=core --stream",
"stop": "kill-port --port 5000",
"scan": "i18next-scanner --config i18next-scanner.config.js",
"prepare": "cd .. && husky install .husky"
"scan": "i18next-scanner --config i18next-scanner.config.js"
},
"keywords": [],
"author": "",
@@ -69,7 +68,6 @@
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-react-refresh": "^0.4.4",
"file-saver": "^2.0.5",
"husky": "^9.1.7",
"i18next-scanner": "^4.5.0",
"jest": "^29.7.0",
"jest-environment-jsdom": "^29.7.0",