From bfdb57ba4dfa6a5a8b199c19a1c0de027c5e3937 Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Thu, 21 Nov 2019 21:04:17 +0100 Subject: keep not modified artifact data in cache --- src/artifact.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/artifact.py') diff --git a/src/artifact.py b/src/artifact.py index 010bc6b..fdeeead 100644 --- a/src/artifact.py +++ b/src/artifact.py @@ -74,7 +74,7 @@ class GitArtifact(Artifact): # check if we have already provided this checkout if os.path.exists(location): - return + return location # check if we have already retrieved the repo if not os.path.exists(self.repo): @@ -93,6 +93,7 @@ class GitArtifact(Artifact): proc = subprocess.run(["git", "submodule", "update", "--init", "--recursive"], cwd=location, # stdout=subprocess.PIPE, stderr=subprocess.PIPE, universal_newlines=True) + return location class ArchiveArtifact(Artifact): """External archive""" @@ -126,7 +127,7 @@ class ArchiveArtifact(Artifact): # Check if we already provided the archive at location if os.path.exists(location): - return + return location os.makedirs(location, exist_ok=True) @@ -140,3 +141,5 @@ class ArchiveArtifact(Artifact): universal_newlines=True) if proc.returncode != 0: raise Exception(f"Failed to extract {self.name}") + + return location -- cgit v1.2.3