Skip to content
Snippets Groups Projects

:books: Use package version in build documentation

Merged Vincent Hatakeyama requested to merge topic/16.0/doc-use-package-version into branch/16.0
1 file
+ 8
6
Compare changes
  • Side-by-side
  • Inline
+ 8
6
@@ -11,6 +11,7 @@ import ast
import configparser
import os
import sys
from importlib.metadata import version
from odoo_scripts.config import Configuration
@@ -50,18 +51,19 @@ master_doc = "index"
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The full version, including alpha/beta/rc tags.
release = version("odoo-addon-redner")
# The short X.Y version.
version = ".".join(release.split(".")[:2])
with open(os.path.join("..", "__manifest__.py"), "r") as f:
read_data = f.read()
d = ast.literal_eval(read_data)
# The full version, including alpha/beta/rc tags.
release = d["version"]
# The short X.Y version.
version = ".".join(release.split(".")[:4])
# General information about the project.
project = d["name"]
copyright = "2021, 2022 XCG Consulting"
copyright = "2021, 2022, 2023 XCG Consulting"
author = d["author"]
module_nospace = project.replace(" ", "")
module_description = d.get("summary", "")
Loading