Release signing fix + Obtainium install guide + publish script
Some checks failed
build-apk / build (push) Failing after 5m9s

- Fix withReleaseSigning: RN template's unconditional debug signingConfig was
  overriding the release key. Now uses the release key when BBP_UPLOAD_* is set
  (verified: APK signed CN=BigBrainParking), else debug.
- INSTALL.md: dead-simple Obtainium setup (one-tap obtainium:// link + manual
  Forgejo-source steps). README links it.
- scripts/publish-release.sh: create a Forgejo release + upload the signed APK.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Hank 2026-07-07 13:27:19 -07:00
parent a5bfec894e
commit a8ba1fcae4
5 changed files with 94 additions and 3 deletions

1
.gitignore vendored
View file

@ -21,3 +21,4 @@ app/.expo/
# OS / editor
.DS_Store
*.log
.keys/

46
INSTALL.md Normal file
View file

@ -0,0 +1,46 @@
# Install BigBrainParking
BigBrainParking is distributed through **Obtainium** — a free, open-source app updater.
No Google Play, no account. Works great on **GrapheneOS** and any Android phone.
## 1. Get Obtainium (once)
Install Obtainium from **F-Droid** or its GitHub releases:
- F-Droid / IzzyOnDroid: search "Obtainium"
- or https://github.com/ImranR98/Obtainium/releases (grab the `.apk`)
## 2. Add BigBrainParking
**Easiest — one tap:** open this link on your phone (with Obtainium installed):
> `obtainium://add/https://git.mowden.top/hank/BigBrainParking`
It opens Obtainium's Add screen pre-filled. Tap **Add**.
**Manual (if the link doesn't work):**
1. Open Obtainium → **Add App**.
2. Paste the source URL:
```
https://git.mowden.top/hank/BigBrainParking
```
3. If asked for a source type, choose **Forgejo** (git.mowden.top runs Forgejo).
4. Tap **Add**.
## 3. Install & update
Obtainium shows the latest version — tap **Install**. GrapheneOS/Android will ask you to
allow installs from Obtainium the first time; approve it.
From then on, Obtainium notifies you when a new version is released and updates in a tap.
## Notifications (optional)
Parking-expiry reminders work on-device with **no Google services**. For any future
server-pushed notifications, install **ntfy** (F-Droid) and set it as your UnifiedPush
distributor — BigBrainParking will use it automatically.
## Notes
- Unofficial client for the ParkSmarter (IPS Group) parking system. Not affiliated with or
endorsed by IPS Group. Use with your own ParkSmarter account.
- Source & releases: https://git.mowden.top/hank/BigBrainParking

View file

@ -4,6 +4,12 @@ An unofficial, de-Googled client for the ParkSmarter (IPS Group) parking system,
built to run on **GrapheneOS** with **UnifiedPush** notifications and distributed
via **Obtainium** — no Google Play Services, no Firebase, no app store.
## Install it (users)
BigBrainParking installs and updates through **Obtainium** — no Google Play, no account.
**One tap** (with Obtainium installed): `obtainium://add/https://git.mowden.top/hank/BigBrainParking`
— or follow **[INSTALL.md](INSTALL.md)** for the manual steps. Works on GrapheneOS.
## Monorepo layout
```

View file

@ -33,10 +33,12 @@ module.exports = function withReleaseSigning(config) {
/signingConfigs \{/,
`signingConfigs {${SIGNING_BLOCK}`,
);
// 2) Point the release buildType at it *only* when the keystore env is set.
// 2) Point the release buildType at the release key when its env is set, else
// debug. Replace the RN template's unconditional debug line inside the
// release {} block (otherwise it overrides the release config).
gradle = gradle.replace(
/(buildTypes \{[\s\S]*?release \{)/,
`$1\n if (System.getenv("BBP_UPLOAD_STORE_FILE") != null) { signingConfig signingConfigs.release }`,
/(release \{[\s\S]*?)signingConfig signingConfigs\.debug/,
`$1signingConfig System.getenv("BBP_UPLOAD_STORE_FILE") != null ? signingConfigs.release : signingConfigs.debug`,
);
}

36
scripts/publish-release.sh Executable file
View file

@ -0,0 +1,36 @@
#!/usr/bin/env bash
# Publish a signed APK as a Forgejo release so Obtainium can track it.
#
# Prereqs:
# - A signed APK built at ./BigBrainParking-v<version>.apk (see docs/DISTRIBUTION.md)
# - A Forgejo token with repo write scope, in $FORGEJO_TOKEN or .keys/forgejo.token
# (create at: git.mowden.top -> Settings -> Applications -> Generate Token, scope: repository)
#
# Usage: ./scripts/publish-release.sh
set -euo pipefail
cd "$(dirname "$0")/.."
REPO="hank/BigBrainParking"
API="https://git.mowden.top/api/v1"
TOKEN="${FORGEJO_TOKEN:-$(cat .keys/forgejo.token 2>/dev/null || true)}"
[ -n "$TOKEN" ] || { echo "ERROR: set FORGEJO_TOKEN or put a token in .keys/forgejo.token"; exit 1; }
VERSION="$(node -e "console.log(require('./app/app.json').expo.version)")"
TAG="v$VERSION"
APK="BigBrainParking-$TAG.apk"
[ -f "$APK" ] || { echo "ERROR: $APK not found — build a signed release first"; exit 1; }
echo "Publishing $TAG ($APK)…"
# Create the release (also creates the git tag on main if missing).
REL="$(curl -sf -X POST "$API/repos/$REPO/releases" \
-H "Authorization: token $TOKEN" -H "Content-Type: application/json" \
-d "{\"tag_name\":\"$TAG\",\"target_commitish\":\"main\",\"name\":\"BigBrainParking $TAG\",\"body\":\"Unofficial ParkSmarter client for GrapheneOS. Install/update via Obtainium.\"}")"
ID="$(printf '%s' "$REL" | node -e "let s='';process.stdin.on('data',d=>s+=d).on('end',()=>console.log(JSON.parse(s).id||''))")"
[ -n "$ID" ] || { echo "ERROR: release create failed: $REL"; exit 1; }
# Upload the APK asset.
curl -sf -X POST "$API/repos/$REPO/releases/$ID/assets?name=$APK" \
-H "Authorization: token $TOKEN" -F "attachment=@$APK" >/dev/null
echo "✓ Published: https://git.mowden.top/$REPO/releases/tag/$TAG"