Verified Commit 3145c2d7 authored by David Runge's avatar David Runge
Browse files

cli: Add entrypoint for arch-release-sync

arch_release_promotion/cli.py:
Add `arch_release_sync()` as entrypoint for arch-release-sync, using
`files.ProjectFiles.sync()` to synchronize any configured releases for a
given project.
parent d4af71d2
......@@ -117,3 +117,27 @@ def main() -> None:
else:
for project in config.Projects().projects:
promote_project_release(project=project)
def arch_release_sync() -> None:
"""Synchronize releases
If the argument parser contains a specific project to synchronize, only synchronize that, else all configured
projects.
"""
args = argparse.ArgParseFactory.synchronize().parse_args()
projects = config.Projects()
settings = config.Settings()
if args.project:
files.ProjectFiles.sync(
project_config=projects.get_project(name=args.project),
settings=settings,
)
else:
for project in projects.projects:
files.ProjectFiles.sync(
project_config=project,
settings=settings,
)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment