mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-02-02 23:50:04 +08:00
Use mirror (#4444)
This commit is contained in:
parent
b80606aec5
commit
0c29068182
@ -4,18 +4,18 @@ usage () {
|
||||
echo ".ci/update_remote.sh [option] [target]"
|
||||
}
|
||||
|
||||
check_remote () {
|
||||
if [ -z "$(git remote -v | grep git@gitee.com:spacevim/SpaceVim.git)" ];then
|
||||
git remote add gitee git@gitee.com:spacevim/SpaceVim.git
|
||||
fi
|
||||
}
|
||||
|
||||
push_gitee()
|
||||
{
|
||||
git remote add gitee https://SpaceVimBot:${BOTSECRET}@gitee.com/spacevim/SpaceVim.git
|
||||
git push gitee master
|
||||
}
|
||||
|
||||
push_gitlab()
|
||||
{
|
||||
git remote add gitlab https://SpaceVimBot:${BOTSECRET}@gitlab.com/SpaceVim/SpaceVim.git
|
||||
git push gitlab master
|
||||
}
|
||||
|
||||
push_coding()
|
||||
{
|
||||
git remote add coding https://spacevim%40outlook.com:${CODINGBOTSECRET}@e.coding.net/spacevim/SpaceVim.git
|
||||
@ -23,9 +23,6 @@ push_coding()
|
||||
}
|
||||
|
||||
main () {
|
||||
if [ $# -gt 0 ]
|
||||
check_remote
|
||||
then
|
||||
case $1 in
|
||||
--help|-h)
|
||||
usage
|
||||
@ -35,12 +32,15 @@ main () {
|
||||
push_gitee
|
||||
exit 0
|
||||
;;
|
||||
gitlab)
|
||||
push_gitlab
|
||||
exit 0
|
||||
;;
|
||||
coding)
|
||||
push_coding
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
}
|
||||
|
||||
main $@
|
||||
|
2
.github/workflows/remote.yml
vendored
2
.github/workflows/remote.yml
vendored
@ -7,7 +7,7 @@ jobs:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
mirror: ["gitee", "coding"]
|
||||
mirror: ["gitee", "coding", "gitlab"]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
|
Loading…
Reference in New Issue
Block a user