All checks were successful
infra/kickstart/pipeline/head This commit looks good
Every time the job runs, the _Publish_ stage changes the timestamps of the files on the server, even if their contents haven't changed. This is because each build runs from a fresh checkout, so every file appears to have just been created. To avoid this, and leave files on the server alone unless they've changed, we now set the modification timestamp of every file from its last commit.
9 lines
180 B
Bash
Executable File
9 lines
180 B
Bash
Executable File
#!/bin/sh
|
|
|
|
git ls-files | while IFS= read -r file; do
|
|
ts=$(git log -1 --format=%at -- "${file}")
|
|
if [ -n "${ts}" ]; then
|
|
touch -d "@${ts}" -- "${file}"
|
|
fi
|
|
done
|