From 19362370c09dd4ac945ed7cfff07d91f0db95353 Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Fri, 6 Mar 2020 13:41:22 +0100 Subject: update git checkouts --- src/artifact.py | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src') 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 -- cgit v1.2.3