From f5f541f2f46c36559ed4a6a88ae55db5a30ddc65 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Holcroft Date: Dec 08 2020 23:02:21 +0000 Subject: simplify start_path --- diff --git a/build.py b/build.py index b46e4e7..cca50b1 100755 --- a/build.py +++ b/build.py @@ -326,20 +326,13 @@ def make_components_list(): repo_name = urlparse(doc_url).hostname+urlparse(doc_url).path[1:].replace('.git', '') repo_dir = os.path.dirname(os.path.abspath(__file__)) + "/sources/" + repo_name - if 'start_path' in source: - print("* %i/%i %s start_path:%s" % (current, total, doc_url, source['start_path']), flush=True) - current += 1 - get_component(repo_dir, basedir=source['start_path']) + basedir = source.get("start_path", "/") + branches = source.get("branches", ["master"]) - elif 'branches' in source: - for branch in source['branches']: - print("* %i/%i %s branch:%s" % (current, total, doc_url, branch), flush=True) - current += 1 - get_component(repo_dir, branch=branch) - else: - print("* %i/%i %s" % (current, total, doc_url), flush=True) + for branch in branches: + print("* {c}/{t} {u} branch={b} start_path:{d}".format(c=current,t=total, u=doc_url, b=branch, d=basedir), flush=True) current += 1 - get_component(repo_dir) + get_component(repo_dir, branch=branch, basedir=basedir) # Remove site.yml os.remove("site.yml")