diff options
| author | Florian Fischer <florian.fl.fischer@fau.de> | 2020-07-09 12:51:12 +0200 |
|---|---|---|
| committer | Florian Fischer <florian.fl.fischer@fau.de> | 2020-07-09 12:51:12 +0200 |
| commit | 7a73948c649fb4a15825677d33095f995d07c4b1 (patch) | |
| tree | 88095ec085ac57c2354b354393b436120350e908 | |
| parent | 241ae2bf7f28741cc6a3c50730e9d08ee54dfb17 (diff) | |
| download | allocbench-7a73948c649fb4a15825677d33095f995d07c4b1.tar.gz allocbench-7a73948c649fb4a15825677d33095f995d07c4b1.zip | |
[artifact] also fetch new tags from git remote
| -rw-r--r-- | allocbench/artifact.py | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/allocbench/artifact.py b/allocbench/artifact.py index 28b82aa..55daa3a 100644 --- a/allocbench/artifact.py +++ b/allocbench/artifact.py @@ -52,6 +52,9 @@ class Artifact: run_cmd(cmd, output_verbosity=1, cwd=self.basedir) +GIT_FETCH_CMD = ["git", "fetch", "--force", "--tags"] + + class GitArtifact(Artifact): """External git repository""" def __init__(self, name, url): @@ -72,9 +75,7 @@ class GitArtifact(Artifact): # check if we have already provided this checkout if os.path.exists(location): try: - run_cmd(["git", "fetch", "--force"], - output_verbosity=1, - cwd=location) + run_cmd(GIT_FETCH_CMD, output_verbosity=1, cwd=location) except CalledProcessError: print_error(f"Failed to update {location}") raise @@ -94,9 +95,7 @@ class GitArtifact(Artifact): # update repo print_status(f'Updating git repository "{self.name}" ...') try: - run_cmd(["git", "fetch", "--force"], - output_verbosity=1, - cwd=self.repo) + run_cmd(GIT_FETCH_CMD, output_verbosity=1, cwd=self.repo) except CalledProcessError: print_error(f"Failed to update {self.name}") raise |
