Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Website: Update rsync command to clean up more completely #1361

Merged
merged 1 commit into from
May 3, 2024

Conversation

brandonpayton
Copy link
Member

@brandonpayton brandonpayton commented May 3, 2024

What is this PR doing?

Tightens the rsync command used to sync website files to WP Cloud so that removed files are properly removed.

Related to #1197

What problem is it solving?

To avoid an rsync error about not being able to set mtime or permissions of /srv/htdocs, which is owned by root, we previously used a wildcard in the source like rsync -av --delete source-dir/* target-dir/. A problem with this is that, when files are removed from the relative root, they are not considered for deletion because they do not belong to a subtree matched by the wildcard.

How is the problem addressed?

The rsync command is fixed to no longer update file permissions and to skip updating times on directories. This should keep it from attempting to update /srv/htdocs and erroring.

Testing Instructions

Test manually on playground-dot-wordpress-dot-net.atomicsites.blog

@brandonpayton brandonpayton self-assigned this May 3, 2024
@brandonpayton brandonpayton merged commit d09f8bc into trunk May 3, 2024
5 checks passed
@brandonpayton brandonpayton deleted the fix-deploy-rsync-cleanup branch May 3, 2024 23:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant