also update mtimes on src/_cffi_src (#8567)

This commit is contained in:
Alex Gaynor 2023-03-22 08:27:36 -04:00 committed by GitHub
parent e09fccc749
commit 0ff4eb208d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -11,7 +11,7 @@ runs:
echo "The git available is probably too old so checkout didn't create a real git clone, skipping mtime fix"
exit 0
fi
ls -Rla src/rust/src
ls -Rla src/rust/src src/_cffi_src
echo "Verifying commits are monotonic because if they're not caching gets wrecked"
COMMIT_ORDER=$(git log --pretty=format:%cd --date=format-local:%Y%m%d%H%M.%S -5)
SORTED_COMMIT_ORDER=$(git log --pretty=format:%cd --date=format-local:%Y%m%d%H%M.%S -5 | sort -rn)
@ -19,8 +19,8 @@ runs:
echo "Commits are not monotonic, git may have changed how date formatting works"
exit 1
fi
echo "Setting mtimes for rust dirs"
for f in $(git ls-files src/rust); do touch -t $(git log --pretty=format:%cd --date=format-local:%Y%m%d%H%M.%S -1 HEAD -- "$f") "$f"; done
echo "Setting mtimes for dirs"
for f in $(git ls-files src/rust src/_cffi_src); do touch -t $(git log --pretty=format:%cd --date=format-local:%Y%m%d%H%M.%S -1 HEAD -- "$f") "$f"; done
echo "Done"
ls -Rla src/rust/src
ls -Rla src/rust/src src/_cffi_src
shell: bash