Publish list-versions.tsv on the website

This commit is contained in:
Alexey Milovidov 2020-11-28 09:20:06 +03:00
parent 24bd2e8e8e
commit e1e5735ed6
3 changed files with 16 additions and 4 deletions

View File

@ -202,7 +202,11 @@ def build(args):
if __name__ == '__main__':
os.chdir(os.path.join(os.path.dirname(__file__), '..'))
website_dir = os.path.join('..', 'website')
# A root path to ClickHouse source code.
src_dir = '..'
website_dir = os.path.join(src_dir, 'website')
arg_parser = argparse.ArgumentParser()
arg_parser.add_argument('--lang', default='en,es,fr,ru,zh,ja,tr,fa')
@ -210,6 +214,7 @@ if __name__ == '__main__':
arg_parser.add_argument('--docs-dir', default='.')
arg_parser.add_argument('--theme-dir', default=website_dir)
arg_parser.add_argument('--website-dir', default=website_dir)
arg_parser.add_argument('--src-dir', default=src_dir)
arg_parser.add_argument('--blog-dir', default=os.path.join(website_dir, 'blog'))
arg_parser.add_argument('--output-dir', default='build')
arg_parser.add_argument('--enable-stable-releases', action='store_true')

View File

@ -145,13 +145,19 @@ def build_website(args):
'public',
'node_modules',
'templates',
'locale'
'locale',
'.gitkeep'
)
)
# This file can be requested to check for available ClickHouse releases.
shutil.copy2(
os.path.join(args.src_dir, 'utils', 'list-versions', 'version_date.tsv'),
os.path.join(args.output_dir, 'data', 'version_date.tsv'))
shutil.copy2(
os.path.join(args.website_dir, 'js', 'embedd.min.js'),
os.path.join(args.output_dir, 'js', 'embedd.min.js')
)
os.path.join(args.output_dir, 'js', 'embedd.min.js'))
for root, _, filenames in os.walk(args.output_dir):
for filename in filenames:

1
website/data/.gitkeep Normal file
View File

@ -0,0 +1 @@
# This directory will contain miscellaneous data files on ClickHouse website