From f2fb432d2e22f139d8ab5611627f9c59e52fff18 Mon Sep 17 00:00:00 2001 From: Trent Larson Date: Sat, 9 Dec 2023 22:15:24 -0700 Subject: [PATCH] update documentation for going to production --- README.md | 23 +++++++++++++++-------- sw_scripts/safari-notifications.js | 6 +++++- 2 files changed, 20 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index b207b08ca..9e3fbb7e2 100644 --- a/README.md +++ b/README.md @@ -22,16 +22,23 @@ npm run lint If you are deploying in a subdirectory, add it to `publicPath` in vue.config.js, eg: `publicPath: "/app/time-tracker/",` -``` -npm run build -``` +* `npx prettier --write ./sw_scripts/` -``` -npx prettier --write ./sw_scripts/ -``` -to make sure the service worker scripts are in proper form +...to make sure the service worker scripts are in proper form + +* Update the CHANGELOG.md & the version in package.json, run `npm install`, and commit. Tag wth the new version: `git tag 0.1.0` + +* If production, change src/constants/app.ts DEFAULT_*_SERVER to be PROD. + +* `npm run build` + +* Revert src/constants/app.ts & change version to "-beta" + +* `cp sw_scripts/[ns]* dist/` + +... to copy the contents of the `sw_scripts` folder to the `dist` folder - except additional_scripts.js. -... then copy the contents of the `sw_scripts` folder to the `dist` folder - except additional_scripts.js. +* `rsync -azvu -e "ssh -i ~/.ssh/..." dist ubuntu@endorser.ch:time-safari` diff --git a/sw_scripts/safari-notifications.js b/sw_scripts/safari-notifications.js index a9ecfd586..32c12e02b 100644 --- a/sw_scripts/safari-notifications.js +++ b/sw_scripts/safari-notifications.js @@ -520,7 +520,11 @@ async function getNotificationCount() { const most_recent_notified = claims[0]["id"]; await setMostRecentNotified(most_recent_notified); } else { - console.error("The service worker got a bad response status when fetching claims:", response.status, response); + console.error( + "The service worker got a bad response status when fetching claims:", + response.status, + response, + ); } break; }