release(fdroid): v0.4.3 — fix self-hosted F-Droid publish (v2-only signing)
The self-hosted F-Droid repo (https://dzianisv.github.io/opencode-mobile/fdroid/repo) has been stuck at v0.4.1 because publish-fdroid crashed in androguard parsing the CI APK's v2+v3 signature block pair ('NoOverwriteDict' object has no attribute 'append'). Force v1+v2-only signing: gradle flags for local builds, plus a deterministic apksigner re-sign step in the workflow (expo prebuild regenerates build.gradle, so the workflow step is the real guarantee). Bump to v0.4.3 / versionCode 5 so a fresh tag re-runs the publish with the verified bug fixes (#10 scope fixes, send-error fix) included. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
23
.github/workflows/publish-fdroid.yml
vendored
23
.github/workflows/publish-fdroid.yml
vendored
@@ -68,6 +68,29 @@ jobs:
|
||||
working-directory: android
|
||||
run: ./gradlew assembleRelease
|
||||
|
||||
- name: Re-sign APK v1+v2 only (drop v3/v4 for fdroidserver compatibility)
|
||||
if: ${{ env.RELEASE_STORE_FILE != '' }}
|
||||
run: |
|
||||
# androguard (used by fdroidserver) crashes parsing a v2+v3 signature
|
||||
# block pair: "'NoOverwriteDict' object has no attribute 'append'".
|
||||
# expo prebuild regenerates build.gradle, so we can't rely on the
|
||||
# gradle signing flags surviving — force v1+v2-only here deterministically.
|
||||
APK=android/app/build/outputs/apk/release/app-release.apk
|
||||
APKSIGNER=$(ls "$ANDROID_HOME"/build-tools/*/apksigner | sort -V | tail -1)
|
||||
echo "Using $APKSIGNER"
|
||||
"$APKSIGNER" sign \
|
||||
--ks android/app/release.keystore \
|
||||
--ks-pass "pass:${RELEASE_STORE_PASSWORD}" \
|
||||
--ks-key-alias "${RELEASE_KEY_ALIAS}" \
|
||||
--key-pass "pass:${RELEASE_KEY_PASSWORD}" \
|
||||
--v1-signing-enabled true \
|
||||
--v2-signing-enabled true \
|
||||
--v3-signing-enabled false \
|
||||
--v4-signing-enabled false \
|
||||
"$APK"
|
||||
echo "=== signature schemes after re-sign ==="
|
||||
"$APKSIGNER" verify -v "$APK" | grep -i "Verified using" || true
|
||||
|
||||
- name: Install fdroidserver
|
||||
# androguard version matters: 4.0.x crashes parsing our APK resources
|
||||
# ("res1 must be zero!"); 4.1.0/4.1.1 crash on the signature block
|
||||
|
||||
@@ -94,8 +94,8 @@ android {
|
||||
applicationId 'cc.agentlabs.opencode'
|
||||
minSdkVersion rootProject.ext.minSdkVersion
|
||||
targetSdkVersion rootProject.ext.targetSdkVersion
|
||||
versionCode 4
|
||||
versionName "0.4.2"
|
||||
versionCode 5
|
||||
versionName "0.4.3"
|
||||
|
||||
buildConfigField "String", "REACT_NATIVE_RELEASE_LEVEL", "\"${findProperty('reactNativeReleaseLevel') ?: 'stable'}\""
|
||||
}
|
||||
@@ -112,6 +112,16 @@ android {
|
||||
storePassword System.getenv("RELEASE_STORE_PASSWORD")
|
||||
keyAlias System.getenv("RELEASE_KEY_ALIAS")
|
||||
keyPassword System.getenv("RELEASE_KEY_PASSWORD")
|
||||
// Sign with v1+v2 only. A v2+v3 block pair crashes the androguard
|
||||
// version fdroidserver uses ("'NoOverwriteDict' object has no
|
||||
// attribute 'append'"), which broke the self-hosted F-Droid repo
|
||||
// publish from v0.4.2 on. v1+v2 installs on all supported API levels
|
||||
// and matches the known-good published APK. Re-enable v3 only once
|
||||
// fdroidserver/androguard ships the fix.
|
||||
enableV1Signing true
|
||||
enableV2Signing true
|
||||
enableV3Signing false
|
||||
enableV4Signing false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
4
app.json
4
app.json
@@ -2,7 +2,7 @@
|
||||
"expo": {
|
||||
"name": "OpenCode",
|
||||
"slug": "opencode-mobile",
|
||||
"version": "0.4.2",
|
||||
"version": "0.4.3",
|
||||
"orientation": "portrait",
|
||||
"scheme": "opencode",
|
||||
"userInterfaceStyle": "automatic",
|
||||
@@ -34,7 +34,7 @@
|
||||
},
|
||||
"android": {
|
||||
"package": "cc.agentlabs.opencode",
|
||||
"versionCode": 4,
|
||||
"versionCode": 5,
|
||||
"usesCleartextTraffic": true,
|
||||
"adaptiveIcon": {
|
||||
"foregroundImage": "./assets/adaptive-icon.png",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@opencode-ai/mobile",
|
||||
"version": "0.4.2",
|
||||
"version": "0.4.3",
|
||||
"private": true,
|
||||
"main": "expo-router/entry",
|
||||
"scripts": {
|
||||
|
||||
Reference in New Issue
Block a user