Preserve mtimes on deploy !2
1 file changed, +4 −1
Layout: unified · split
build.py +4 −1
| @@ -178,7 +178,10 @@ def deploy_to_server(build_dir, server, dry_run=False): | ||
| 178 | 178 | print(f"{'Would deploy' if dry_run else 'Deploying'} {build_dir}/ → {remote_path}") |
| 179 | 179 | cmd = [ |
| 180 | 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 | 185 | "--delete-before", |
| 183 | 186 | # The build cache lives in the output directory because it describes it, but it |
| 184 | 187 | # is not part of the site. Excluding it also stops --delete removing it locally. |