- .gitea/workflows/ci.yml: gateway plugin tests + Kotlin host tests on push/PR (hermes-agent cloned at pinned SHA, vendored test mirror) - .gitea/workflows/release.yml: manual dispatch; runs tests, builds signed Android APK (debug fallback) + Linux desktop app-image/deb via jpackage, creates Gitea release v<version> with artifacts (re-run safe) - androidApp: versionName from -PappVersion, CI release signing from ANDROID_KEYSTORE_* env vars - desktopApp: jpackage --app-version from -PappVersion - scripts/make_release_keystore.sh: one-time keystore + Gitea secret setup - vendor gateway-plugin/tests/test_android.py (byte-identical mirror) and ignore it in .pi-lens.json
38 lines
1.3 KiB
Bash
Executable File
38 lines
1.3 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# One-time setup: create the Android release keystore and print the values to
|
|
# paste into Gitea (repo -> Settings -> Actions -> Secrets).
|
|
#
|
|
# Usage: scripts/make_release_keystore.sh [output-file]
|
|
# (default: ~/iris-release.keystore)
|
|
#
|
|
# WARNING: back up the keystore file immediately. If it is lost, the app can
|
|
# never be updated on users' phones (a new key = a brand-new app as far as
|
|
# Android is concerned).
|
|
set -euo pipefail
|
|
|
|
OUT="${1:-$HOME/iris-release.keystore}"
|
|
if [ -e "$OUT" ]; then
|
|
echo "Refusing to overwrite existing file: $OUT" >&2
|
|
exit 1
|
|
fi
|
|
|
|
STORE_PASS="$(openssl rand -base64 18 | tr -d '/+=')"
|
|
KEY_PASS="$(openssl rand -base64 18 | tr -d '/+=')"
|
|
|
|
keytool -genkeypair -v \
|
|
-keystore "$OUT" -storetype PKCS12 \
|
|
-alias iris -keyalg RSA -keysize 2048 -validity 10000 \
|
|
-storepass "$STORE_PASS" -keypass "$KEY_PASS" \
|
|
-dname "CN=Iris Release, OU=Mobile, O=Iris, C=DE"
|
|
|
|
echo
|
|
echo "Keystore written to: $OUT"
|
|
echo ">>> Back it up NOW (password manager / cloud storage). <<<"
|
|
echo
|
|
echo "Add these four secrets in Gitea (repo -> Settings -> Actions -> Secrets):"
|
|
echo
|
|
echo " ANDROID_KEYSTORE_BASE64 = $(base64 -w0 "$OUT")"
|
|
echo
|
|
echo " ANDROID_KEYSTORE_PASSWORD = $STORE_PASS"
|
|
echo " ANDROID_KEY_ALIAS = iris"
|
|
echo " ANDROID_KEY_PASSWORD = $KEY_PASS" |