1
0
Fork 0

Initial work to auto-commit updated caches

This commit is contained in:
Luca Beltrame 2021-01-04 09:10:56 +01:00
parent 620694ab38
commit d4d0209623
Signed by: einar
GPG key ID: 4707F46E9EC72DEC

View file

@ -151,6 +151,16 @@ def update_packages(cache_file, repo_mapping_file):
hash_data.save()
def commit_changes(cache_file):
repo = git.Repo(Path.curdir())
repo.index.add([cache_file])
repo.index.commit("Update caches")
origin = repo.remotes["origin"]
origin.pull(rebase=True)
origin.push()
def main():
parser = argparse.ArgumentParser()