Compare commits
No commits in common. "4962ae4b2f461a7a3b1311fabdcfb2f5e9fe4703" and "f43652e16bc53f687f615878322c063f63607358" have entirely different histories.
4962ae4b2f
...
f43652e16b
|
|
@ -298,11 +298,6 @@ class Deployer:
|
||||||
if not self.run_command(f'git commit -m "{commit_msg}"', cwd=repo_path):
|
if not self.run_command(f'git commit -m "{commit_msg}"', cwd=repo_path):
|
||||||
return False
|
return False
|
||||||
|
|
||||||
# 推送前先拉取远程最新代码
|
|
||||||
self.logger.info("推送前先拉取远程最新代码...")
|
|
||||||
if not self.run_command(f"git pull --rebase origin {self.main_repo_branch}", cwd=repo_path):
|
|
||||||
self.logger.warning("拉取远程代码失败,尝试直接推送")
|
|
||||||
|
|
||||||
# 推送到远程
|
# 推送到远程
|
||||||
if not self.run_command(f"git push origin {self.main_repo_branch}", cwd=repo_path):
|
if not self.run_command(f"git push origin {self.main_repo_branch}", cwd=repo_path):
|
||||||
self.logger.warning("推送失败,但部署已完成")
|
self.logger.warning("推送失败,但部署已完成")
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue