mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 08:32:02 +00:00
Merge pull request #24385 from ClickHouse/debug-documentation
Debug strange errors in documentation
This commit is contained in:
commit
ddaf577be7
@ -62,7 +62,6 @@ def build_amp(lang, args, cfg):
|
||||
for root, _, filenames in os.walk(site_temp):
|
||||
if 'index.html' in filenames:
|
||||
paths.append(prepare_amp_html(lang, args, root, site_temp, main_site_dir))
|
||||
test.test_amp(paths, lang)
|
||||
logging.info(f'Finished building AMP version for {lang}')
|
||||
|
||||
|
||||
|
@ -3,34 +3,9 @@
|
||||
import logging
|
||||
import os
|
||||
import sys
|
||||
|
||||
import bs4
|
||||
|
||||
import logging
|
||||
import os
|
||||
import subprocess
|
||||
|
||||
import bs4
|
||||
|
||||
|
||||
def test_amp(paths, lang):
|
||||
try:
|
||||
# Get latest amp validator version
|
||||
subprocess.check_call('amphtml-validator --help',
|
||||
stdout=subprocess.DEVNULL,
|
||||
stderr=subprocess.DEVNULL,
|
||||
shell=True)
|
||||
except subprocess.CalledProcessError:
|
||||
subprocess.check_call('npm i -g amphtml-validator', stderr=subprocess.DEVNULL, shell=True)
|
||||
|
||||
paths = ' '.join(paths)
|
||||
command = f'amphtml-validator {paths}'
|
||||
try:
|
||||
subprocess.check_output(command, shell=True).decode('utf-8')
|
||||
except subprocess.CalledProcessError:
|
||||
logging.error(f'Invalid AMP for {lang}')
|
||||
raise
|
||||
|
||||
|
||||
def test_template(template_path):
|
||||
if template_path.endswith('amp.html'):
|
||||
|
Loading…
Reference in New Issue
Block a user