From 9c84302c2e11353a38638fe748861a3bc34cc7a1 Mon Sep 17 00:00:00 2001
From: Trent Larson <trent@trentlarson.com>
Date: Sat, 5 Apr 2025 15:04:28 -0600
Subject: [PATCH] consolidate build & test instructions

---
 BUILDING.md | 66 +++++++++++++++++++++++++++++++++++++++++++++--------
 README.md   | 53 ------------------------------------------
 2 files changed, 56 insertions(+), 63 deletions(-)

diff --git a/BUILDING.md b/BUILDING.md
index a5619b0e..7ce6943b 100644
--- a/BUILDING.md
+++ b/BUILDING.md
@@ -37,22 +37,19 @@ You'll also want to edit the deep link configuration (see below).
 
 ## Initial Setup
 
-1. Clone the repository:
+Install dependencies:
 
    ```bash
-   git clone [repository-url]
-   cd TimeSafari
+   npm install
    ```
 
-2. Install dependencies:
+## Web Dev Locally
 
    ```bash
-   npm install
+   npm run dev
    ```
 
-## Web Build
-
-To build for web deployment:
+## Web Build for Server
 
 1. Run the production build:
 
@@ -60,14 +57,63 @@ To build for web deployment:
    npm run build
    ```
 
-2. The built files will be in the `dist` directory.
+   The built files will be in the `dist` directory.
+
+2. To test the production build locally:
 
-3. To test the production build locally:
+   You'll likely want to use test locations for the Endorser & image & partner servers; see "DEFAULT_ENDORSER_API_SERVER" & "DEFAULT_IMAGE_API_SERVER" & "DEFAULT_PARTNER_API_SERVER" below.
 
    ```bash
    npm run serve
    ```
 
+### Compile and minify for test & production
+
+* If there are DB changes: before updating the test server, open browser(s) with current version to test DB migrations.
+
+* `npx prettier --write ./sw_scripts/`
+
+* Update the ClickUp tasks & CHANGELOG.md & the version in package.json, run `npm install`.
+
+* Commit everything (since the commit hash is used the app).
+
+* Put the commit hash in the changelog (which will help you remember to bump the version later).
+
+* Tag with the new version, [online](https://gitea.anomalistdesign.com/trent_larson/crowd-funder-for-time-pwa/releases) or `git tag 0.3.55 && git push origin 0.3.55`.
+
+* For test, build the app (because test server is not yet set up to build):
+
+```bash
+TIME_SAFARI_APP_TITLE="TimeSafari_Test" VITE_APP_SERVER=https://test.timesafari.app VITE_BVC_MEETUPS_PROJECT_CLAIM_ID=https://endorser.ch/entity/01HWE8FWHQ1YGP7GFZYYPS272F VITE_DEFAULT_ENDORSER_API_SERVER=https://test-api.endorser.ch VITE_DEFAULT_IMAGE_API_SERVER=https://test-image-api.timesafari.app VITE_DEFAULT_PARTNER_API_SERVER=https://test-partner-api.endorser.ch VITE_PASSKEYS_ENABLED=true npm run build
+```
+
+   ... and transfer to the test server:
+
+   ```bash
+   rsync -azvu -e "ssh -i ~/.ssh/..." dist ubuntutest@test.timesafari.app:time-safari
+   ```
+
+(Let's replace that with a .env.development or .env.staging file.)
+
+(Note: The test BVC_MEETUPS_PROJECT_CLAIM_ID does not resolve as a URL because it's only in the test DB and the prod redirect won't redirect there.)
+
+* For prod, get on the server and run the correct build:
+
+  ... and log onto the server:
+
+  * `pkgx +npm sh`
+
+  * `cd crowd-funder-for-time-pwa && git checkout master && git pull && git checkout 0.3.55 && npm install && npm run build && cd -`
+
+  (The plain `npm run build` uses the .env.production file.)
+
+* Back up the time-safari/dist folder & deploy: `mv time-safari/dist time-safari-dist-prev.0 && mv crowd-funder-for-time-pwa/dist time-safari/`
+
+* Record the new hash in the changelog. Edit package.json to increment version & add "-beta", `npm install`, and commit. Also record what version is on production.
+
+
+
+
 ## Desktop Build (Electron)
 
 ### Linux Build
diff --git a/README.md b/README.md
index 1f299ad8..3139bb57 100644
--- a/README.md
+++ b/README.md
@@ -19,59 +19,6 @@ npm run dev
 
 See [BUILDING.md](BUILDING.md) for more details.
 
-See the test locations for "IMAGE_API_SERVER" or "PARTNER_API_SERVER" below, or use http://localhost:3000 for local endorser.ch
-
-
-### Run all UI tests
-
-Look at [BUILDING.md](BUILDING.md) for the "test-all" instructions and [TESTING.md](test-playwright/TESTING.md) for more details.
-
-
-### Compile and minify for test & production
-
-* If there are DB changes: before updating the test server, open browser(s) with current version to test DB migrations.
-
-* `npx prettier --write ./sw_scripts/`
-
-* Update the ClickUp tasks & CHANGELOG.md & the version in package.json, run `npm install`.
-
-* Commit everything (since the commit hash is used the app).
-
-* Put the commit hash in the changelog (which will help you remember to bump the version later).
-
-* Tag with the new version, [online](https://gitea.anomalistdesign.com/trent_larson/crowd-funder-for-time-pwa/releases) or `git tag 0.3.55 && git push origin 0.3.55`.
-
-* For test, build the app (because test server is not yet set up to build):
-
-```bash
-TIME_SAFARI_APP_TITLE="TimeSafari_Test" VITE_APP_SERVER=https://test.timesafari.app VITE_BVC_MEETUPS_PROJECT_CLAIM_ID=https://endorser.ch/entity/01HWE8FWHQ1YGP7GFZYYPS272F VITE_DEFAULT_ENDORSER_API_SERVER=https://test-api.endorser.ch VITE_DEFAULT_IMAGE_API_SERVER=https://test-image-api.timesafari.app VITE_DEFAULT_PARTNER_API_SERVER=https://test-partner-api.endorser.ch VITE_PASSKEYS_ENABLED=true npm run build
-```
-
-   ... and transfer to the test server:
-
-   ```bash
-   rsync -azvu -e "ssh -i ~/.ssh/..." dist ubuntutest@test.timesafari.app:time-safari
-   ```
-
-(Let's replace that with a .env.development or .env.staging file.)
-
-(Note: The test BVC_MEETUPS_PROJECT_CLAIM_ID does not resolve as a URL because it's only in the test DB and the prod redirect won't redirect there.)
-
-* For prod, get on the server and run the correct build:
-
-  ... and log onto the server:
-
-  * `pkgx +npm sh`
-
-  * `cd crowd-funder-for-time-pwa && git checkout master && git pull && git checkout 0.3.55 && npm install && npm run build && cd -`
-
-  (The plain `npm run build` uses the .env.production file.)
-
-* Back up the time-safari/dist folder & deploy: `mv time-safari/dist time-safari-dist-prev.0 && mv crowd-funder-for-time-pwa/dist time-safari/`
-
-* Record the new hash in the changelog. Edit package.json to increment version & add "-beta", `npm install`, and commit. Also record what version is on production.
-
-