fix version master being compared to 14.3alpha1

This commit is contained in:
Antoine Vandevenne (anv) 2021-04-01 14:24:00 +02:00
parent 19d38d2953
commit c1039d6d94

View File

@ -68,10 +68,11 @@ if not odoo_dir.is_dir():
else: else:
sys.path.insert(0, str(odoo_dir.absolute())) sys.path.insert(0, str(odoo_dir.absolute()))
from odoo import release as odoo_release # Don't collide with Sphinx's 'release' config option from odoo import release as odoo_release # Don't collide with Sphinx's 'release' config option
if release != odoo_release.version: odoo_version = odoo_release.version if 'alpha' not in odoo_release.version else 'master'
if release != odoo_version:
_logger.warning( _logger.warning(
f"Found Odoo sources directory but with version {odoo_release.version} incompatible " f"Found Odoo sources directory but with version '{odoo_version}' incompatible with "
f"with documentation version {version}.\n" f"documentation version '{version}'.\n"
f"The 'Developer' documentation will be built but autodoc directives will be skipped.\n" f"The 'Developer' documentation will be built but autodoc directives will be skipped.\n"
f"In order to fully build the 'Developer' documentation, checkout the matching branch" f"In order to fully build the 'Developer' documentation, checkout the matching branch"
f" with `cd odoo && git checkout {version}`." f" with `cd odoo && git checkout {version}`."