mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-09 09:21:46 +00:00
d15a0e2b4f
Adds IfcGit.get_repo_description(), which returns a git-describe style
string (tags, always, dirty) for the repo containing an IFC file, or
None when GitPython is unavailable, the file isn't in a git repo, or
the repo has no commits yet.
sheeter.py's build_titleblock() now makes this available to the
pystache titleblock template render as a "GitDescribe" key, falling
back to an empty string rather than the literal word "None". This is
purely additive: sheet.get_info() itself is untouched, no shipped
titleblock SVG references the new key, and existing Revision,
Identification and Name substitution behaviour is unchanged. Users who
want the git description on their titleblock can reference
{{GitDescribe}} in their own custom titleblock SVG.
Part of the "Make revision list and most recent tag available to
drawing generation" item from issue #3096.
Generated with the assistance of an AI coding tool.