Adding rsync --delete flag on up
This commit is contained in:
@@ -3222,6 +3222,9 @@ def cmd_sync(project_path: Path, verbose: bool, dry_run: bool, download: bool) -
|
|||||||
"-e",
|
"-e",
|
||||||
f"ssh -p {server['port']}",
|
f"ssh -p {server['port']}",
|
||||||
*[f"--exclude={p}" for p in _RSYNC_EXCLUDES],
|
*[f"--exclude={p}" for p in _RSYNC_EXCLUDES],
|
||||||
|
# On upload: delete server-side files that no longer exist locally so
|
||||||
|
# the remote stays an exact mirror of the local project.
|
||||||
|
*(["--delete"] if not download else []),
|
||||||
src,
|
src,
|
||||||
dest,
|
dest,
|
||||||
]
|
]
|
||||||
|
|||||||
Reference in New Issue
Block a user