diff options
author | jakob.stendahl <jakob.stendahl@infomedia.dk> | 2023-01-15 22:45:19 +0100 |
---|---|---|
committer | Jakob Stendahl <jakob.stendahl@outlook.com> | 2023-01-15 22:45:19 +0100 |
commit | 40a0423208c0863fb5be95f4e6bdc48a25482996 (patch) | |
tree | 139c4a799bb7b7f183a8b9c85ff1caae056b9d58 | |
parent | 1e6f4e166ef3ac73f8bfaf1b98504d7fd660a9ce (diff) | |
download | microbit-gamepad-40a0423208c0863fb5be95f4e6bdc48a25482996.tar.gz microbit-gamepad-40a0423208c0863fb5be95f4e6bdc48a25482996.zip |
Fix service worker error, update deploy script
-rwxr-xr-x | deploy.sh | 17 | ||||
-rw-r--r-- | src/js/main.js | 2 | ||||
-rw-r--r-- | src/service-worker.js | 2 |
3 files changed, 16 insertions, 5 deletions
@@ -53,13 +53,24 @@ git add . git commit -m ":rocket: Deploy app v$VERSION" tput setaf 4 -echo "> Return to controller branch and tag last commit" +<<<<<<< Updated upstream +echo "> Return to main branch and tag last commit" tput sgr0 -git checkout controller +git checkout main #git tag "v$VERSION" -git push -f origin controller +git push -f origin main +======= +echo "> Return to main branch and tag last commit" +tput sgr0 + +git checkout main + +#git tag "v$VERSION" + +git push -f origin main +>>>>>>> Stashed changes #git push origin "v$VERSION" git push origin gh-pages diff --git a/src/js/main.js b/src/js/main.js index 801a9eb..3a6f9e9 100644 --- a/src/js/main.js +++ b/src/js/main.js @@ -6,7 +6,7 @@ import { Gamepad } from './gamepad'; let sw = "service-worker.js"; if (navigator.serviceWorker) { navigator.serviceWorker.register( - sw, {scope: '/hoverbit-ble/'} + sw, {scope: '/microbit-gamepad/'} ).then(registration => { registration.onupdatefound = () => { const installingWorker = registration.installing; diff --git a/src/service-worker.js b/src/service-worker.js index 96accb3..112a0e7 100644 --- a/src/service-worker.js +++ b/src/service-worker.js @@ -1,4 +1,4 @@ -var APP_PREFIX = 'hoverbitcontroller' // Identifier for this app (this needs to be consistent across every cache update) +var APP_PREFIX = 'microbitgamepad' // Identifier for this app (this needs to be consistent across every cache update) var VERSION = '{{ VERSION }}' // Version of the off-line cache (change this value everytime you want to update cache) var CACHE_NAME = APP_PREFIX + VERSION var URLS = ["{{ CACHE_FILES }}"] // This will be replaced by the deploy-script |