From 2cb2015a6a9cecac3e204af9951675b981f19554 Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Mon, 17 Feb 2020 12:15:56 +0100 Subject: update existing GitArtifacts --- src/artifact.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/artifact.py b/src/artifact.py index 7f020f2..a358446 100644 --- a/src/artifact.py +++ b/src/artifact.py @@ -77,6 +77,14 @@ class GitArtifact(Artifact): if not os.path.exists(self.repo): self.retrieve() + # update repo + print_status(f'Updating git repository "{self.name}" ...') + try: + run_cmd(["git", "fetch"], output_verbosity=1, cwd=self.repo) + except CalledProcessError as e: + print_error(f"Failed to update {self.name}") + raise e + worktree_cmd = ["git", "worktree", "add", location, checkout] print_debug("create new worktree. By running: ", worktree_cmd, f"in {self.repo}") -- cgit v1.2.3