Skip to content

Commit

Permalink
feat(ci): put version in the public version file
Browse files Browse the repository at this point in the history
  • Loading branch information
teomrd committed Nov 2, 2024
1 parent 000b4ee commit 7b7827e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ cp ./src/manifest.json ./dist
cp ./static/favicon.ico ./dist
cp ./src/service-worker.js ./dist

echo "$NEW_VERSION" >./dist/version

cp -r ./src/assets/images ./dist/images

deno -A ./scripts/build.js
Expand Down
2 changes: 1 addition & 1 deletion src/service-worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const checkForNewerVersion = (currentVersion) => {
const version = await res.text();
if (currentVersion !== version.trim()) {
self.registration.showNotification("✍️ MiroPad has been updated", {
body: `Version ${version} is available, refresh to update!`,
body: `MiroPad ${version} is available, refresh to update!`,
});
clearInterval(intervalChecker);
}
Expand Down

0 comments on commit 7b7827e

Please sign in to comment.