Fix builds in worktrees

authors.html assumed there would always be a .git
directory, which is not true in worktrees
This commit is contained in:
Oliver Blanthorn 2026-07-18 12:22:32 +02:00
parent ad61b8c6a5
commit 47e2436ccf
No known key found for this signature in database
GPG key ID: 2BB8C36BB504BFF3

View file

@ -12,7 +12,7 @@ authors="../../build/static/authors.html"
sed "/REPLACETHIS/,$ d" authors.html > "$authors"
# If we're in a git repo, refresh the cache
if [ -d "../../.git/" ]; then
if git rev-parse --is-inside-work-tree >/dev/null 2>&1; then
git shortlog -sn HEAD | cut -c8- | awk '!seen[$0]++' | sed 's/^/<p>/' | sed 's/$/<\/p>/' > ../../.build_cache/authors
fi