1
0
mirror of https://github.com/coalaura/whiskr.git synced 2025-09-08 00:29:54 +00:00

add cache busting

This commit is contained in:
Laura
2025-08-23 13:17:46 +02:00
parent ebb27ef34e
commit 53f999471d

View File

@@ -44,6 +44,15 @@ jobs:
- name: Build ${{ matrix.goos }}_${{ matrix.goarch }}
shell: bash
run: |
for f in static/css/*.css static/js/*.js static/lib/*.css static/lib/*.js; do
[ -f "$f" ] || continue
hash=$(sha1sum "$f" | cut -c1-8)
filepath=${f#static/}
sed -i "s|\([\"']$filepath\)[\"']|\1?v=$hash\"|g" static/index.html
done
mkdir -p build
[[ "${{ matrix.goos }}" == "windows" ]] && EXT=".exe" || EXT=""