2021-08-26 21:00:19 +08:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
usage () {
|
|
|
|
echo ".ci/update_remote.sh [option] [target]"
|
|
|
|
}
|
|
|
|
|
|
|
|
push_gitee()
|
|
|
|
{
|
|
|
|
git remote add gitee https://SpaceVimBot:${BOTSECRET}@gitee.com/spacevim/SpaceVim.git
|
2021-09-09 20:55:44 +08:00
|
|
|
git push gitee master -f
|
2021-08-26 21:00:19 +08:00
|
|
|
}
|
|
|
|
|
2021-08-29 00:33:12 +08:00
|
|
|
push_gitlab()
|
|
|
|
{
|
|
|
|
git remote add gitlab https://SpaceVimBot:${BOTSECRET}@gitlab.com/SpaceVim/SpaceVim.git
|
2021-09-09 20:55:44 +08:00
|
|
|
git push gitlab master -f
|
2021-08-29 00:33:12 +08:00
|
|
|
}
|
|
|
|
|
2021-08-26 21:00:19 +08:00
|
|
|
push_coding()
|
|
|
|
{
|
|
|
|
git remote add coding https://spacevim%40outlook.com:${CODINGBOTSECRET}@e.coding.net/spacevim/SpaceVim.git
|
2021-09-09 20:55:44 +08:00
|
|
|
git push coding master -f
|
2021-08-26 21:00:19 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
main () {
|
2021-08-29 00:33:12 +08:00
|
|
|
case $1 in
|
|
|
|
--help|-h)
|
|
|
|
usage
|
|
|
|
exit 0
|
|
|
|
;;
|
|
|
|
gitee)
|
|
|
|
push_gitee
|
|
|
|
exit 0
|
|
|
|
;;
|
|
|
|
gitlab)
|
|
|
|
push_gitlab
|
|
|
|
exit 0
|
|
|
|
;;
|
|
|
|
coding)
|
|
|
|
push_coding
|
|
|
|
exit 0
|
|
|
|
;;
|
|
|
|
esac
|
2021-08-26 21:00:19 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
main $@
|