mirror of
https://github.com/coalaura/whiskr.git
synced 2025-09-09 09:19:54 +00:00
add cache busting
This commit is contained in:
9
.github/workflows/release.yml
vendored
9
.github/workflows/release.yml
vendored
@@ -44,6 +44,15 @@ jobs:
|
|||||||
- name: Build ${{ matrix.goos }}_${{ matrix.goarch }}
|
- name: Build ${{ matrix.goos }}_${{ matrix.goarch }}
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
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
|
mkdir -p build
|
||||||
[[ "${{ matrix.goos }}" == "windows" ]] && EXT=".exe" || EXT=""
|
[[ "${{ matrix.goos }}" == "windows" ]] && EXT=".exe" || EXT=""
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user