global: adding project anatomy data for formating

This commit is contained in:
Jakub Jezek 2023-01-06 10:35:54 +01:00
parent 5c6d86e06b
commit 20b2b50bac
No known key found for this signature in database
GPG key ID: 730D7C02726179A7

View file

@ -691,7 +691,14 @@ class AbstractTemplateBuilder(object):
key: value
for key, value in os.environ.items()
}
fill_data["root"] = anatomy.roots
fill_data["project"] = {
"name": project_name,
"code": anatomy["attributes"]["code"]
}
result = StringTemplate.format_template(path, fill_data)
if result.solved:
path = result.normalized()