aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fl.fischer@fau.de>2020-03-06 13:41:22 +0100
committerFlorian Fischer <florian.fl.fischer@fau.de>2020-03-06 13:41:22 +0100
commit19362370c09dd4ac945ed7cfff07d91f0db95353 (patch)
treef87041389c70d0c41dd0f679970b65420cec111a
parentd488ec9699ec252aeaddb9510d45c2ac673a7de6 (diff)
downloadallocbench-19362370c09dd4ac945ed7cfff07d91f0db95353.tar.gz
allocbench-19362370c09dd4ac945ed7cfff07d91f0db95353.zip
update git checkouts
-rw-r--r--src/artifact.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/artifact.py b/src/artifact.py
index eff80cf..9df01c8 100644
--- a/src/artifact.py
+++ b/src/artifact.py
@@ -71,6 +71,16 @@ class GitArtifact(Artifact):
# check if we have already provided this checkout
if os.path.exists(location):
+ try:
+ run_cmd(["git", "fetch"], output_verbosity=1, cwd=location)
+ except CalledProcessError as e:
+ print_error(f"Failed to update {location}")
+ raise
+ try:
+ run_cmd(["git", "reset", "--hard", checkout], output_verbosity=1, cwd=location)
+ except CalledProcessError as e:
+ print_error(f"Failed to update {location}")
+ raise
return location
# check if we have already retrieved the repo