synchronize

This commit is contained in:
Marc Beninca 2024-07-30 19:39:11 +02:00
parent b77ff553ee
commit 461303c736
Signed by: marc.beninca
GPG key ID: 9C7613450C80C24F

View file

@ -22,12 +22,18 @@ def spcd_build_project() -> None:
pass
def spcd_synchronize() -> None:
host = env.SPCD_PROJECT_PATH
source = "out"
user = "cd"
root = Path(os.sep) / user / project.branch / projects.group / project.name
target = f"{user}@{host}:{root}"
def spcd_synchronize(
target: str | None = None, source: str | None = None
) -> None:
if not target:
user = "cd"
host = env.SPCD_PROJECT_PATH
root = (
Path(os.sep) / user / project.branch / projects.group / project.name
)
target = f"{user}@{host}:{root}"
if not source:
source = "out"
ps.run(
"rsync",
"--archive",