write git version info to version_info.json file.

fix big when collecting RepoStatusInfo
This commit is contained in:
Maximilian Keßler 2022-02-09 21:49:28 +01:00
parent bcebdfd86f
commit 038a3dca48
2 changed files with 3 additions and 1 deletions

View file

@ -272,6 +272,8 @@ class PyTeXBuilder:
self._new_version_info.files.append(
file_version_info
)
file_version_info.git_version_info = source_file.formatter.git_version_info # TODO:
# only pytex formatters
def _move_files(self):
for source_file in self._files_to_build:

View file

@ -15,7 +15,7 @@ def get_repo_status_info_from_file(file: Path) -> RepoStatusInfo:
def get_repo_status_info(repo: git.Repo) -> RepoStatusInfo:
info = RepoStatusInfo()
try:
info.branch = repo.active_branch
info.branch = str(repo.active_branch)
except TypeError: # No branch available
pass
try: