提交 e4f0256e 编写于 作者: V Vincent Demeester 提交者: tekton-robot

sync: allow nested dirs 😅

not yet supported by the sidebar, but at least it would sync correctly
Signed-off-by: NVincent Demeester <vdemeest@redhat.com>
上级 d5c1dc31
......@@ -45,6 +45,7 @@ def retrieve_files(url_prefix, dest_prefix, files):
src_url = f'{url_prefix}/{k}'
dest_path = f'{dest_prefix}/{f[k]}'
print(f'Downloading file (from {src_url} to {dest_path}).\n')
os.makedirs(os.path.dirname(dest_path), exist_ok=True)
wget.download(src_url, out=dest_path)
print('\n')
......@@ -71,7 +72,6 @@ def sync(sync_config):
retrieve_files(url_prefix, dest_prefix, files)
transform_links(f'/docs/{component.lower()}/', dest_prefix, files)
# Get the previous versions of contents
for tag in tags[1:]:
url_prefix = f'{repository}/raw/{tag["name"]}/{doc_directory}'
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册