User Manual: Remove old files for when deploying #7

Merged
Bart van der Braak merged 4 commits from Blendify/blender-devops:manual-doc-rsync-delete into main 2024-10-04 10:56:45 +02:00
Showing only changes of commit 95a7dd51d3 - Show all commits

View File

@ -216,8 +216,14 @@ def deliver(builder: ManualBuilder) -> None:
# Sync html files
source_path = f"{builder.build_path}/{doc_format}/{locale}/"
dest_path = f"{connect_id}:{version_remote_path}/"
# Exclude zip files so `--delete` does not delete existing archives
worker.utils.rsync(source_path, dest_path, exclude_paths=[".doctrees", ".*zip"], delete=True, delete_path_check=docs_remote_path)
# Exclude zip files; these get synced with `needs_package_delivery`.
Blendify marked this conversation as resolved Outdated

The comment can become more descriptive. It is possibly to deduct that detete=True and --exclude=*.zip will preserve archives. But why is it needed? What the existing archives referred from the comment exactly are?

The comment can become more descriptive. It is possibly to deduct that `detete=True` and `--exclude=*.zip` will preserve archives. But why is it needed? What the existing archives referred from the comment exactly are?

There are html and epub zip files in the same folder, for downloading the manual. The epub zip in particular is uploaded by a builder that runs in parallel with this one.

There are html and epub zip files in the same folder, for downloading the manual. The epub zip in particular is uploaded by a builder that runs in parallel with this one.
worker.utils.rsync(
Blendify marked this conversation as resolved Outdated

I have not tested, but the pattern looks wrong and the folder could be more specific:
.*.zip -> *.zip
docs_remote_path -> version_remote_path

I have not tested, but the pattern looks wrong and the folder could be more specific: `.*.zip` -> `*.zip` `docs_remote_path` -> `version_remote_path`
source_path,
dest_path,
exclude_paths=[".doctrees", "blender_manual_*.zip"],
delete=True,
delete_path_check=version_remote_path
)
# Create links
if builder.track_id == "vdev":