Merge pull request '修复关于强制仓库覆盖的问题' (#1) from develop into master
This commit is contained in:
commit
a2a07770d3
|
@ -52,23 +52,23 @@ async def sync_inter_code_by_rabase(project: ProjectDTO, job: JobDTO):
|
|||
await cmd.shell('git remote add gitee ' +
|
||||
gitee_address, repo_dir, job)
|
||||
await cmd.shell('git fetch gitee', repo_dir, job)
|
||||
await cmd.shell('git pull -r gitee ' + job.gitee_branch, repo_dir, job)
|
||||
await cmd.shell(f"git pull gitee {job.gitee_branch} --no-edit", repo_dir, job)
|
||||
|
||||
# if gitcode is not null, sync it
|
||||
if project.code_china_address:
|
||||
await cmd.shell('git remote add csdn ' +
|
||||
project.code_china_address, repo_dir, job)
|
||||
await cmd.shell('git fetch csdn', repo_dir, job)
|
||||
await cmd.shell('git pull -r csdn ' + job.code_china_branch, repo_dir, job)
|
||||
await cmd.shell(f"git pull csdn {job.code_china_branch} --no-edit", repo_dir, job)
|
||||
|
||||
await cmd.shell(
|
||||
f"git push origin {job.github_branch} -f", repo_dir, job)
|
||||
f"git push origin {job.github_branch}", repo_dir, job)
|
||||
if project.gitee_address:
|
||||
await cmd.shell(
|
||||
f"git push gitee {job.github_branch}:{job.gitee_branch} -f", repo_dir, job)
|
||||
f"git push gitee {job.github_branch}:{job.gitee_branch}", repo_dir, job)
|
||||
if project.code_china_address:
|
||||
await cmd.shell(
|
||||
f"git push csdn {job.github_branch}:{job.code_china_branch} -f", repo_dir, job)
|
||||
f"git push csdn {job.github_branch}:{job.code_china_branch}", repo_dir, job)
|
||||
|
||||
# update the latest commit hash
|
||||
# for rebase logic maybe is not useful
|
|
@ -55,7 +55,7 @@ async def sync_inter_code_by_rabase(project: ProjectDTO, job: JobDTO):
|
|||
await cmd.shell('git remote add github ' +
|
||||
github_address, repo_dir, job)
|
||||
await cmd.shell('git fetch github', repo_dir, job)
|
||||
await cmd.shell('git pull -r github ' + job.github_branch, repo_dir, job)
|
||||
await cmd.shell(f"git pull github {job.github_branch} --no-edit", repo_dir, job)
|
||||
# if gitee is not null, sync it
|
||||
if project.gitee_address and job.gitee_branch:
|
||||
# gitee
|
||||
|
@ -63,26 +63,26 @@ async def sync_inter_code_by_rabase(project: ProjectDTO, job: JobDTO):
|
|||
await cmd.shell('git remote add gitee ' +
|
||||
gitee_address, repo_dir, job)
|
||||
await cmd.shell('git fetch gitee', repo_dir, job)
|
||||
await cmd.shell('git pull -r gitee ' + job.gitee_branch, repo_dir, job)
|
||||
await cmd.shell(f"git pull gitee {job.gitee_branch} --no-edit", repo_dir, job)
|
||||
|
||||
# # if gitcode is not null, sync it
|
||||
# if project.code_china_address:
|
||||
# await cmd.shell('git remote add csdn ' +
|
||||
# project.code_china_address, repo_dir, job)
|
||||
# await cmd.shell('git fetch csdn', repo_dir, job)
|
||||
# await cmd.shell('git pull -r csdn ' + job.code_china_branch, repo_dir, job)
|
||||
# await cmd.shell(f"git pull csdn {job.code_china_branch} --no-edit", repo_dir, job)
|
||||
|
||||
await cmd.shell(
|
||||
f"git push origin {job.gitlink_branch} -f", repo_dir, job)
|
||||
f"git push origin {job.gitlink_branch}", repo_dir, job)
|
||||
if project.github_address and job.github_branch:
|
||||
await cmd.shell(
|
||||
f"git push github {job.gitlink_branch}:{job.github_branch} -f", repo_dir, job)
|
||||
f"git push github {job.gitlink_branch}:{job.github_branch}", repo_dir, job)
|
||||
if project.gitee_address and job.gitee_branch:
|
||||
await cmd.shell(
|
||||
f"git push gitee {job.gitlink_branch}:{job.gitee_branch} -f", repo_dir, job)
|
||||
f"git push gitee {job.gitlink_branch}:{job.gitee_branch}", repo_dir, job)
|
||||
if project.code_china_address:
|
||||
await cmd.shell(
|
||||
f"git push csdn {job.github_branch}:{job.code_china_branch} -f", repo_dir, job)
|
||||
f"git push csdn {job.github_branch}:{job.code_china_branch}", repo_dir, job)
|
||||
|
||||
# update the latest commit hash
|
||||
# for rebase logic maybe is not useful
|
||||
|
|
Loading…
Reference in New Issue