diff --git a/utils/mkdocs.py b/utils/mkdocs.py index 1378781149..43f5f46233 100644 --- a/utils/mkdocs.py +++ b/utils/mkdocs.py @@ -15,9 +15,10 @@ gs = None from generate_last_commit_file import COMMIT_DATE_FORMAT - + top_dir = os.path.abspath(os.getenv("MODULE_TOPDIR")) + def read_file(name): try: return Path(name).read_text() @@ -119,6 +120,7 @@ def get_last_git_commit(src_dir, top_dir, addon_path, major_version): # During GRASS GIS compilation from source code without Git return get_git_commit_from_file(src_dir=src_dir) + def parse_git_commit( commit, src_dir, diff --git a/utils/mkhtml.py b/utils/mkhtml.py index 20197203ab..0e17278334 100644 --- a/utils/mkhtml.py +++ b/utils/mkhtml.py @@ -593,10 +593,7 @@ def to_title(name): url_log = url_source.replace(tree, commits) git_commit = get_last_git_commit( - src_dir=curdir, - top_dir=topdir, - addon_path=addon_path or None, - major_version=major + src_dir=curdir, top_dir=topdir, addon_path=addon_path or None, major_version=major ) if git_commit["commit"] == "unknown": date_tag = "Accessed: {date}".format(date=git_commit["date"])