The Android job died on `tauri.properties not found`. It is not found because `cargo tauri android init` does not write it: in a clean clone init leaves gen/android/app/ holding build.gradle.kts, proguard-rules.pro and src/, nothing else. The generated app/.gitignore names the pattern — tauri.properties sits with tauri.build.gradle.kts and proguard-tauri.pro, the tauri.* files that `android build` stamps out on every run. So the step was wrong twice and the crash was the lucky half. Had the file existed, the build would have rewritten it from tauri.conf.json and discarded the sed — a green build shipping the default versionCode, which is the failure that reaches a rider's phone rather than the log. Tauri exposes the actual input, so use it: - tauri.conf.json gains bundle.android.versionCode, committed rather than conjured by CI, so the key is greppable and the sed has a fixed target. - ci-android-version-code.sh edits the config. Formula and the 1000 floor are unchanged; the header comment is rewritten, since its premise (init writes the file, the default collides) does not hold — Tauri's default is major*1000000 + minor*1000 + patch, monotonic, and it puts 0.1.0 at exactly 1000, which is where the floor comes from. Missing key or failed substitution now exits 1 instead of degrading to a silent no-op. - The step moves ahead of `android init`, next to ci-set-version.sh, since both edit the same config. Verified against a clean clone: 0.1.0 -> 1100, v0.2.3 -> 1203, v1.0.0 -> 11000, config still parses at each step. Then a real `cargo tauri android build`, which wrote versionCode=1100 into tauri.properties — the value reaches the APK. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
52 lines
1.3 KiB
JSON
52 lines
1.3 KiB
JSON
{
|
|
"$schema": "https://schema.tauri.app/config/2",
|
|
"productName": "BikeControl",
|
|
"version": "0.1.0",
|
|
"identifier": "paris.tourolle.bikecontrol",
|
|
"build": {
|
|
"frontendDist": "../ui/dist",
|
|
"devUrl": "http://localhost:1420",
|
|
"beforeDevCommand": {
|
|
"cwd": "../ui",
|
|
"script": "npm run dev"
|
|
},
|
|
"beforeBuildCommand": {
|
|
"cwd": "../ui",
|
|
"script": "npm run build"
|
|
}
|
|
},
|
|
"app": {
|
|
"windows": [
|
|
{
|
|
"title": "BikeControl",
|
|
"width": 1440,
|
|
"height": 900,
|
|
"minWidth": 960,
|
|
"minHeight": 640,
|
|
"resizable": true,
|
|
"fullscreen": false,
|
|
"backgroundColor": "#07090d"
|
|
}
|
|
],
|
|
"security": {
|
|
"csp": "default-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' data:; connect-src ipc: http://ipc.localhost"
|
|
}
|
|
},
|
|
"bundle": {
|
|
"active": true,
|
|
"targets": "all",
|
|
"icon": [
|
|
"icons/32x32.png",
|
|
"icons/128x128.png",
|
|
"icons/128x128@2x.png",
|
|
"icons/icon.png"
|
|
],
|
|
"category": "Utility",
|
|
"android": {
|
|
"versionCode": 1100
|
|
},
|
|
"shortDescription": "Indoor cycling trainer control",
|
|
"longDescription": "Control a smart trainer over BLE, ride gradient profiles and synthetic waveforms, and record the result."
|
|
}
|
|
}
|