fix bug with version info
This commit is contained in:
parent
7d8f33294f
commit
b53b3be39a
2 changed files with 9 additions and 4 deletions
|
@ -49,9 +49,13 @@ class PyTeXBuilder:
|
|||
@property
|
||||
def version_info(self):
|
||||
if self._version_info is None:
|
||||
version_info_file = self.target_root / VERSION_INFO_FILE
|
||||
if version_info_file.exists():
|
||||
self._version_info = FileVersionInfo.from_json(
|
||||
self.target_root / VERSION_INFO_FILE
|
||||
)
|
||||
else:
|
||||
self._version_info = FileVersionInfo()
|
||||
return self._version_info
|
||||
|
||||
@property
|
||||
|
@ -127,5 +131,4 @@ class PyTeXBuilder:
|
|||
def _build(self):
|
||||
logger.info("Starting build")
|
||||
self.load_pytex_files()
|
||||
raise NotImplementedError
|
||||
|
||||
|
|
2
main.py
2
main.py
|
@ -53,4 +53,6 @@ builder = PyTeXBuilder(conf_path)
|
|||
|
||||
builder.build_tex_sources()
|
||||
|
||||
v = builder.version_info
|
||||
|
||||
pass
|
||||
|
|
Loading…
Reference in a new issue