feat: git archive

This commit is contained in:
莘权 马 2023-11-24 13:48:25 +08:00
parent 45be71d9bf
commit 938fa8a446
2 changed files with 3 additions and 0 deletions

View file

@ -59,4 +59,6 @@ class SoftwareCompany(BaseModel):
logger.debug(f"{n_round=}")
self._check_balance()
await self.environment.run()
if CONFIG.git_repo:
CONFIG.git_repo.archive()
return self.environment.history

View file

@ -151,6 +151,7 @@ class GitRepository:
:param comments: Comments for the archive commit.
"""
logger.info(f"Archive: {[list(self.changed_files.keys())]}")
self.add_change(self.changed_files)
self.commit(comments)