mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 00:22:29 +00:00
Try to fix docs build (#8113)
This commit is contained in:
parent
9534eb32a0
commit
16f677d0c4
@ -45,6 +45,9 @@ def build_for_lang(lang, args):
|
|||||||
os.environ['SINGLE_PAGE'] = '0'
|
os.environ['SINGLE_PAGE'] = '0'
|
||||||
|
|
||||||
config_path = os.path.join(args.docs_dir, 'toc_%s.yml' % lang)
|
config_path = os.path.join(args.docs_dir, 'toc_%s.yml' % lang)
|
||||||
|
if args.is_stable_release and not os.path.exists(config_path):
|
||||||
|
logging.warn('Skipping %s docs, because %s does not exist' % (lang, config_path))
|
||||||
|
return
|
||||||
|
|
||||||
try:
|
try:
|
||||||
theme_cfg = {
|
theme_cfg = {
|
||||||
@ -249,6 +252,7 @@ if __name__ == '__main__':
|
|||||||
arg_parser.add_argument('--output-dir', default='build')
|
arg_parser.add_argument('--output-dir', default='build')
|
||||||
arg_parser.add_argument('--enable-stable-releases', action='store_true')
|
arg_parser.add_argument('--enable-stable-releases', action='store_true')
|
||||||
arg_parser.add_argument('--version-prefix', type=str, default='')
|
arg_parser.add_argument('--version-prefix', type=str, default='')
|
||||||
|
arg_parser.add_argument('--is-stable-release', action='store_true')
|
||||||
arg_parser.add_argument('--skip-single-page', action='store_true')
|
arg_parser.add_argument('--skip-single-page', action='store_true')
|
||||||
arg_parser.add_argument('--skip-pdf', action='store_true')
|
arg_parser.add_argument('--skip-pdf', action='store_true')
|
||||||
arg_parser.add_argument('--skip-website', action='store_true')
|
arg_parser.add_argument('--skip-website', action='store_true')
|
||||||
@ -260,8 +264,6 @@ if __name__ == '__main__':
|
|||||||
|
|
||||||
from github import choose_latest_releases
|
from github import choose_latest_releases
|
||||||
args.stable_releases = choose_latest_releases() if args.enable_stable_releases else []
|
args.stable_releases = choose_latest_releases() if args.enable_stable_releases else []
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
logging.basicConfig(
|
logging.basicConfig(
|
||||||
level=logging.DEBUG if args.verbose else logging.INFO,
|
level=logging.DEBUG if args.verbose else logging.INFO,
|
||||||
|
@ -15,7 +15,7 @@ def choose_latest_releases():
|
|||||||
candidates = requests.get('https://api.github.com/repos/ClickHouse/ClickHouse/tags?per_page=100').json()
|
candidates = requests.get('https://api.github.com/repos/ClickHouse/ClickHouse/tags?per_page=100').json()
|
||||||
for tag in candidates:
|
for tag in candidates:
|
||||||
name = tag.get('name', '')
|
name = tag.get('name', '')
|
||||||
if 'v18' in name or 'stable' not in name:
|
if ('v18' in name) or ('stable' not in name) or ('prestable' in name):
|
||||||
continue
|
continue
|
||||||
major_version = '.'.join((name.split('.', 2))[:2])
|
major_version = '.'.join((name.split('.', 2))[:2])
|
||||||
if major_version not in seen:
|
if major_version not in seen:
|
||||||
@ -33,6 +33,7 @@ def process_release(args, callback, release):
|
|||||||
tar.extractall(base_dir)
|
tar.extractall(base_dir)
|
||||||
args = copy.deepcopy(args)
|
args = copy.deepcopy(args)
|
||||||
args.version_prefix = name
|
args.version_prefix = name
|
||||||
|
args.is_stable_release = True
|
||||||
args.docs_dir = os.path.join(base_dir, os.listdir(base_dir)[0], 'docs')
|
args.docs_dir = os.path.join(base_dir, os.listdir(base_dir)[0], 'docs')
|
||||||
callback(args)
|
callback(args)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user