diff --git a/package.json b/package.json index 1fcf689..59c9129 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "immersive", "private": true, - "version": "0.0.8-12", + "version": "0.0.8-13", "type": "module", "engines": { "node": ">=18.0.0" diff --git a/public/sw.js b/public/sw.js index d918762..fc94aee 100644 --- a/public/sw.js +++ b/public/sw.js @@ -1,5 +1,5 @@ importScripts('https://storage.googleapis.com/workbox-cdn/releases/7.1.0/workbox-sw.js'); -const VERSION = '11'; +const VERSION = '0.0.8-13'; const CACHE = "deepdiagram"; const IMAGEDELIVERY_CACHE = "deepdiagram-images"; const MAPTILE_CACHE = 'maptiler'; diff --git a/versionBump.js b/versionBump.js index 287a4ad..dcabe77 100644 --- a/versionBump.js +++ b/versionBump.js @@ -19,11 +19,16 @@ const getPackageJson = async () => { json.version = newVersion; await fs.writeFile('package.json', JSON.stringify(json, null, 2)); let indexHtml = await fs.readFile('index.html', 'utf8'); - indexHtml = indexHtml.replace('@@VERSION', newVersion); - indexHtml = indexHtml.replace('@@DATE', new Date().toISOString()); + indexHtml = indexHtml.replaceAll('@@VERSION', newVersion); + indexHtml = indexHtml.replaceAll('@@DATE', new Date().toISOString()); const gitId = (await getGitId()).replace('\n', ''); - indexHtml = indexHtml.replace('@@GIT', gitId); + indexHtml = indexHtml.replaceAll('@@GIT', gitId); await fs.writeFile('index.html', indexHtml); + + let sw = await fs.readFile('public/sw.js', 'utf8'); + sw = sw.replace('@@VERSION', newVersion); + fs.writeFile('public/sw.js', sw); + } await getPackageJson();