跨平台项目同步工具

liuyuqi-dellpc bd1bc2684c pull 没有-u参数 10 months ago
.github 52a4b6e44a 更新action 10 months ago
repo_sync bd1bc2684c pull 没有-u参数 10 months ago
scripts aeec9f88e5 修复不能pull的bug 10 months ago
test 9d8692df6a github repo for the project 1 year ago
.env 06861993df 更新脚本 10 months ago
.gitignore f90464635d 完成coding 10 months ago
LICENSE a1be257356 Initial commit 1 year ago
README.md dc746d5c48 增加钉钉推送 10 months ago
favicon.ico dc746d5c48 增加钉钉推送 10 months ago
main.py 2718cafe93 init 1 year ago
requirements.txt f90464635d 完成coding 10 months ago
setup.cfg f90464635d 完成coding 10 months ago
setup.py f90464635d 完成coding 10 months ago

README.md

repo_sync

跨平台项目同步工具

由于项目众多,单一通过自己的代码托管平台存在一定风险。此项目将定期将代码同步到其他平台,以防止代码丢失。

  • github
  • gitlab
  • gitee
  • coding

Usage

  • 1、pc配置 github clone 权限
  • 2、conf/config.json 中配置 github token 创建项目权限
  • 3、data/repo.txt 中配置需要同步的项目
  • 4、执行同步脚本:

比如把 data/repo.txt 中的项目同步到 github 上:

python repo_sync.py --debug true --repo data/repo.txt --type github

计划任务

1、项目以 zhizhou/github 作为项目源,同步到其他平台。 2、同步项目最好每月定时执行一次,以防止代码丢失。

vim /etc/crontab

0 0 1 * * python repo_sync.py --type github