Commit fb054b68f9

fb054b68f94c9606a0bc688597bc20c6d2cdc054

parent: 3cd375119f

Verified · cmc ci/build: success ci/link-check: success ci/lint: success

cmc <hello@cleberg.net> · 2026-08-31 05:34 UTC

Preserve mtimes on deploy

Without -t every transferred file takes the time it arrived, so no two
deploys agree on a timestamp and the next one re-sends all 206 files.

Layout: unified · split

build.py +4 −1
@@ -178,7 +178,10 @@ def deploy_to_server(build_dir, server, dry_run=False):
178 print(f"{'Would deploy' if dry_run else 'Deploying'} {build_dir}/ → {remote_path}") 178 print(f"{'Would deploy' if dry_run else 'Deploying'} {build_dir}/ → {remote_path}")
179 cmd = [ 179 cmd = [
180 "rsync", 180 "rsync",
181 "-r", 181 "-rt",
182 # -t, or rsync gives every transferred file the time it arrived, no two
183 # deploys agree on a timestamp, and the next run re-sends the whole site
184 # because mtimes never match. With it, only what changed goes over.
182 "--delete-before", 185 "--delete-before",
183 # The build cache lives in the output directory because it describes it, but it 186 # The build cache lives in the output directory because it describes it, but it
184 # is not part of the site. Excluding it also stops --delete removing it locally. 187 # is not part of the site. Excluding it also stops --delete removing it locally.