write git version info to version_info.json file.
fix big when collecting RepoStatusInfo
This commit is contained in:
parent
bcebdfd86f
commit
038a3dca48
2 changed files with 3 additions and 1 deletions
|
@ -272,6 +272,8 @@ class PyTeXBuilder:
|
||||||
self._new_version_info.files.append(
|
self._new_version_info.files.append(
|
||||||
file_version_info
|
file_version_info
|
||||||
)
|
)
|
||||||
|
file_version_info.git_version_info = source_file.formatter.git_version_info # TODO:
|
||||||
|
# only pytex formatters
|
||||||
|
|
||||||
def _move_files(self):
|
def _move_files(self):
|
||||||
for source_file in self._files_to_build:
|
for source_file in self._files_to_build:
|
||||||
|
|
|
@ -15,7 +15,7 @@ def get_repo_status_info_from_file(file: Path) -> RepoStatusInfo:
|
||||||
def get_repo_status_info(repo: git.Repo) -> RepoStatusInfo:
|
def get_repo_status_info(repo: git.Repo) -> RepoStatusInfo:
|
||||||
info = RepoStatusInfo()
|
info = RepoStatusInfo()
|
||||||
try:
|
try:
|
||||||
info.branch = repo.active_branch
|
info.branch = str(repo.active_branch)
|
||||||
except TypeError: # No branch available
|
except TypeError: # No branch available
|
||||||
pass
|
pass
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Reference in a new issue