Remove git dependency for stable rebuilds

This commit is contained in:
Oliver Blanthorn 2021-04-30 09:39:09 +02:00
parent 98eadd32f4
commit 4776d73a52
No known key found for this signature in database
GPG key ID: 2BB8C36BB504BFF3
2 changed files with 10 additions and 1 deletions

1
.gitignore vendored
View file

@ -15,3 +15,4 @@ compiler/**/*.js
.*.generated.ts
.tmp/
.DS_Store
.build_cache/

View file

@ -4,10 +4,18 @@ set -e
err() { echo "error: line $(caller)"; }
trap err ERR
mkdir -p .build_cache
cd src/static
authors="../../build/static/authors.html"
sed "/REPLACETHIS/,$ d" authors.html > "$authors"
git shortlog -sn HEAD | cut -c8- | awk '!seen[$0]++' | sed 's/^/<p>/' | sed 's/$/<\/p>/' >> "$authors"
# If we're in a git repo, refresh the cache
if [ -d "../../.git/" ]; then
git shortlog -sn HEAD | cut -c8- | awk '!seen[$0]++' | sed 's/^/<p>/' | sed 's/$/<\/p>/' > ../../.build_cache/authors
fi
cat ../../.build_cache/authors >> "$authors"
sed "1,/REPLACETHIS/ d" authors.html >> "$authors"