I Want To Heal 2 build v1.0.0

This commit is contained in:
Warren H
2026-06-23 23:23:24 -04:00
parent 58e131d0b2
commit f1af450ffe
58 changed files with 2021 additions and 16 deletions
+40 -13
View File
@@ -1,9 +1,5 @@
# I Want To Heal 2 Deployment
## Current Limits
This repo currently deploys the web/server app. It does not yet contain an Android/Capacitor project, so the old APK build step cannot run here until mobile scaffolding is added.
Do not hard-code Gitea tokens in repo files. Export `GITEA_TOKEN` in your shell.
## One-Time Local Git Setup
@@ -23,19 +19,47 @@ cd /Users/warren/Documents/action-mode
git remote set-url origin https://git.whoagland.com/phenom/i-want-to-heal-2.git
```
## Step 1: Web/Server Build Check
## Step 1: Build APK For Thor
```bash
set -e
cd /Users/warren/Documents/action-mode
export JAVA_HOME="/Applications/Android Studio.app/Contents/jbr/Contents/Home"
export PATH="$JAVA_HOME/bin:$PATH"
VERSION="1.0.0"
CURRENT_CODE=$(grep -E 'versionCode [0-9]+' android/app/build.gradle | awk '{print $2}')
NEXT_CODE=$((CURRENT_CODE + 1))
perl -0pi -e "s/versionCode\s+\d+/versionCode $NEXT_CODE/" android/app/build.gradle
perl -0pi -e "s/versionName\s+\"[^\"]+\"/versionName \"$VERSION\"/" android/app/build.gradle
npm ci
VITE_API_BASE_URL="https://iwanttoheal.phenomrom.com" npm run android:sync
cd android
./gradlew clean assembleDebug
cd ..
cp android/app/build/outputs/apk/debug/app-debug.apk "IWantToHeal2-Thor-v$VERSION.apk"
ls -lh "IWantToHeal2-Thor-v$VERSION.apk"
```
## Step 2: Web/Server Build Check
```bash
set -e
cd /Users/warren/Documents/action-mode
npm run lint
npm run build
```
## Step 2: Commit And Push Code
## Step 3: Commit And Push Code
```bash
set -e
@@ -45,11 +69,11 @@ cd /Users/warren/Documents/action-mode
VERSION="1.0.0"
git add .
git commit -m "I Want To Heal 2 web/server v$VERSION"
git commit -m "I Want To Heal 2 build v$VERSION"
git push origin main
```
## Step 3: Create Gitea Release
## Step 4: Create Gitea Release
```bash
set -e
@@ -62,17 +86,22 @@ export GITEA_REPO="i-want-to-heal-2"
# export GITEA_TOKEN="paste-current-token-in-shell-only"
VERSION="1.0.0"
APK="IWantToHeal2-Thor-v$VERSION.apk"
RELEASE_JSON=$(curl -sS -X POST "$GITEA_URL/api/v1/repos/$GITEA_OWNER/$GITEA_REPO/releases" \
-H "Authorization: token $GITEA_TOKEN" \
-H "Content-Type: application/json" \
-d "{\"tag_name\":\"v$VERSION\",\"target_commitish\":\"main\",\"name\":\"v$VERSION\",\"body\":\"I Want To Heal 2 web/server build v$VERSION\",\"draft\":false,\"prerelease\":false}")
-d "{\"tag_name\":\"v$VERSION\",\"target_commitish\":\"main\",\"name\":\"v$VERSION\",\"body\":\"I Want To Heal 2 Android and web/server build v$VERSION\",\"draft\":false,\"prerelease\":false}")
RELEASE_ID=$(python3 -c 'import sys,json; data=json.load(sys.stdin); print(data.get("id") or data)' <<< "$RELEASE_JSON")
echo "Release ID: $RELEASE_ID"
curl -sS -X POST "$GITEA_URL/api/v1/repos/$GITEA_OWNER/$GITEA_REPO/releases/$RELEASE_ID/assets?name=$APK" \
-H "Authorization: token $GITEA_TOKEN" \
-F "attachment=@$APK"
```
## Step 4: First TrueNAS Install
## Step 5: First TrueNAS Install
In the TrueNAS shell:
@@ -100,7 +129,7 @@ Only set this after the reverse proxy/auth layer strips spoofed inbound auth hea
TRUST_AUTH_HEADERS=1
```
## Step 5: Update TrueNAS
## Step 6: Update TrueNAS
In the TrueNAS shell:
@@ -117,8 +146,6 @@ Then restart the TrueNAS custom app.
There is no separate admin server yet. Mechanic admin is currently inside the web app under Action Mode settings. This command serves the same app on port `4174` for local admin work:
After server-side admin is split out, keep this local command shape:
```bash
cd /Users/warren/Documents/action-mode
DATABASE_URL="postgres://iwanttoheal:<password>@127.0.0.1:5432/iwanttoheal" PORT=4174 npm run admin:start