mirror of
https://github.com/servo/servo.git
synced 2025-07-31 03:00:29 +01:00
update Ubuntu version check to > 21.10
Update clang-format version check to use find() instead of startswith() to deal with distro-specific discrepancy
This commit is contained in:
parent
c128c9a609
commit
43b38e3e37
2 changed files with 2 additions and 2 deletions
|
@ -374,7 +374,7 @@ def get_linux_distribution():
|
||||||
raise Exception('unsupported version of %s: %s' % (distrib, version))
|
raise Exception('unsupported version of %s: %s' % (distrib, version))
|
||||||
distrib, version = 'Ubuntu', base_version
|
distrib, version = 'Ubuntu', base_version
|
||||||
elif distrib.lower() == 'ubuntu':
|
elif distrib.lower() == 'ubuntu':
|
||||||
if version > '21.04':
|
if version > '21.10':
|
||||||
raise Exception('unsupported version of %s: %s' % (distrib, version))
|
raise Exception('unsupported version of %s: %s' % (distrib, version))
|
||||||
# Fixme: we should allow checked/supported versions only
|
# Fixme: we should allow checked/supported versions only
|
||||||
elif distrib.lower() not in [
|
elif distrib.lower() not in [
|
||||||
|
|
|
@ -787,7 +787,7 @@ def setup_clangfmt(env):
|
||||||
try:
|
try:
|
||||||
version = check_output([cmd, "--version"], env=env, universal_newlines=True).rstrip()
|
version = check_output([cmd, "--version"], env=env, universal_newlines=True).rstrip()
|
||||||
print(version)
|
print(version)
|
||||||
if not version.startswith("clang-format version {}.".format(CLANGFMT_VERSION)):
|
if version.find("clang-format version {}.".format(CLANGFMT_VERSION)) == -1:
|
||||||
print("clang-format: wrong version (v{} required). Skipping CPP formatting.".format(CLANGFMT_VERSION))
|
print("clang-format: wrong version (v{} required). Skipping CPP formatting.".format(CLANGFMT_VERSION))
|
||||||
return False, None, None
|
return False, None, None
|
||||||
except OSError:
|
except OSError:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue