From b56ffa6552ce0c69ae93cfe17908dd7e7cc93e7f Mon Sep 17 00:00:00 2001 From: BoYanZh Date: Thu, 10 Jun 2021 03:01:53 +0800 Subject: [PATCH] fix: checkout --- joint_teapot/git.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/joint_teapot/git.py b/joint_teapot/git.py index d85606b..d747e89 100644 --- a/joint_teapot/git.py +++ b/joint_teapot/git.py @@ -22,10 +22,10 @@ class Git: branch="master", ) - def repo_checkout_to_tag(self, repo_name: str, tag_name: str) -> str: + def repo_clean_and_checkout(self, repo_name: str, checkout_dest: str) -> str: repo = self.__get_repo(repo_name) repo.git.fetch("--tags", "--all", "-f") repo.git.reset("--hard", f"origin/master") repo.git.clean("-d", "-f", "-x") - repo.git.checkout(f"tags/{tag_name}") + repo.git.checkout(checkout_dest) return os.path.join(self.repos_dir, repo_name)