mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 15:12:02 +00:00
Simply avoid validating AMP
This commit is contained in:
parent
24f1856d5a
commit
cec9d48edc
@ -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}')
|
||||
|
||||
|
||||
|
@ -7,19 +7,6 @@ import bs4
|
||||
import subprocess
|
||||
|
||||
|
||||
def test_amp(paths, lang):
|
||||
# Get latest amp validator version # TODO This makes "leftpad" attack possible, remove it.
|
||||
subprocess.check_call('command -v sudo && sudo npm install --global amphtml-validator || npm install --global amphtml-validator', shell=True)
|
||||
|
||||
for path in paths:
|
||||
command = f'amphtml-validator {path}'
|
||||
try:
|
||||
subprocess.check_output(command, shell=True).decode('utf-8')
|
||||
except subprocess.CalledProcessError:
|
||||
logging.error(f'Invalid AMP for {lang}, {path}')
|
||||
raise
|
||||
|
||||
|
||||
def test_template(template_path):
|
||||
if template_path.endswith('amp.html'):
|
||||
# Inline CSS/JS is ok for AMP pages
|
||||
|
Loading…
Reference in New Issue
Block a user