Compare commits

...

3 Commits

Author SHA1 Message Date
132e49b589 HELP 2022-06-12 00:33:34 +02:00
19b1c73dca help 2022-06-12 00:32:19 +02:00
b8ae68eff8 swupdate test 2022-06-12 00:23:29 +02:00
2 changed files with 8 additions and 1 deletions

7
pre-commit Executable file
View File

@ -0,0 +1,7 @@
#!/usr/bin/env bash
set -eo pipefail
VAR="const currentVersion = '$RANDOM';"
sed "1s/.*/$VAR/" sw.js > sw.js.new
mv sw.js.new sw.js
git add sw.js

2
sw.js
View File

@ -1,4 +1,4 @@
const currentVersion = 'v1';
const currentVersion = '12521';
const addResourcesToCache = async (resources) => {
const cache = await caches.open(currentVersion);