From c10a7105c51f6c502617edd4890572e00c5575f1 Mon Sep 17 00:00:00 2001 From: Tamas Gal <tgal@km3net.de> Date: Tue, 13 Nov 2018 23:33:50 +0100 Subject: [PATCH] Yapf --- publish_images.py | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/publish_images.py b/publish_images.py index 82d6735..1fc002a 100755 --- a/publish_images.py +++ b/publish_images.py @@ -10,25 +10,26 @@ REGISTRY_URL = 'docker.km3net.de' def main(): - changed_dockerfiles = [f.a_path for f in git.Repo('.').index.diff("HEAD~1") - if f.a_path.startswith("base/")] + changed_dockerfiles = [ + f.a_path for f in git.Repo('.').index.diff("HEAD~1") + if f.a_path.startswith("base/") + ] n_files = len(changed_dockerfiles) if n_files == 0: print("Nothing to do!") exit(0) - print("Processing {} dockerfile{}..." - .format(n_files, 's' if n_files else '')) + print("Processing {} dockerfile{}...".format(n_files, + 's' if n_files else '')) for idx, fname in enumerate(changed_dockerfiles): progress = "({}/{})".format(idx + 1, n_files) steps = [("Building", - "docker build --pull -t {0}/{1} -f {1} . " - .format(REGISTRY_URL, fname)), - ("Pushing", - "docker push {0}/{1}" - .format(REGISTRY_URL, fname))] + "docker build --pull -t {0}/{1} -f {1} . ".format( + REGISTRY_URL, fname)), + ("Pushing", "docker push {0}/{1}".format(REGISTRY_URL, + fname))] print('-' * 79) -- GitLab