aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/artifact.py8
1 files changed, 8 insertions, 0 deletions
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}")