Skip to content

Commit

Permalink
🐛 修复Repo为 NoneType 的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
xingchentye committed Jul 18, 2024
1 parent 9a25d75 commit d672bc0
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions .github/release_produce.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@
def clone_repo(repo_url, repo_path, branch="main"):
if not os.path.exists(repo_path):
Repo.clone_from(repo_url, to_path=repo_path, branch=branch)
repo = Repo(repo_path)
repo.git.pull()
return repo
return Repo(repo_path)


def get_max_version_tag(repo, n=1):
Expand Down Expand Up @@ -70,6 +68,7 @@ def main():
# repo_url = "https://tdload.tblstudio.cn/https://github.com/ToolDelta/ToolDelta.git"

repo = clone_repo(repo_url, repo_path)
repo.git.pull()

max_version = get_max_version_tag(repo, 1)
second_max_version = get_max_version_tag(repo, 2)
Expand Down

0 comments on commit d672bc0

Please sign in to comment.