예제 #1
0
파일: core.py 프로젝트: sclorg/betka
 def prepare_upstream_git(self):
     """
     Clone upstream git repository to self.upstream_cloned_dir
     :return:
     """
     self.upstream_cloned_dir = Git.clone_repo(self.msg_upstream_url,
                                               self.betka_tmp_dir.name)
     if self.upstream_cloned_dir is None:
         self.error("!!!! Cloning upstream repo %s FAILED.",
                    self.msg_upstream_url)
         return False
     self.info("Upstream cloned directory %r", self.upstream_cloned_dir)
     return True
예제 #2
0
파일: core.py 프로젝트: sclorg/betka
 def prepare_downstream_git(self) -> bool:
     """
     Clone downstream dist-git repository, defined by self.clone_url variable
     and set `self.downstream_dir` variable.
     :returns True if downstream git directory was cloned
              False if downstream git directory was not cloned
     """
     self.downstream_dir = Git.clone_repo(self.clone_url,
                                          self.betka_tmp_dir.name)
     self.info("Downstream directory %r", self.downstream_dir)
     if self.downstream_dir is None:
         self.error("!!!! Cloning downstream repo %s FAILED.", self.image)
         return False
     os.chdir(str(self.downstream_dir))
     return True
예제 #3
0
def clone_git_repo(repo: str, temp_dir: str) -> Path:
    return Git.clone_repo(repo, temp_dir)