fix(release): give v0.4.15 its own versionCode so the release can actually ship (#180)

The v0.4.15 release commit (f564869) bumped package.json and app.json
`expo.version` but left `android/app/build.gradle` at versionCode 41 /
versionName "0.4.14" and app.json `android.versionCode` at 41. Consequences,
all observed on tag v0.4.15:

- `npm run check:versions` fails, so the F-Droid publish (run 31820921979)
  died at its first step and the `release` job in build.yml never ran — no
  GitHub release exists for v0.4.15. That is the source the new in-app update
  check polls, so the mechanism this release exists to ship had nothing to
  find.
- versionCode 41 is v0.4.14's. F-Droid and every direct-APK install key
  upgrades off versionCode, so even a successful publish would not have been
  offered to the 0.4.10/0.4.14 cohort. Play was unaffected only because the
  publish workflow overrides the code with run_number+100.

Fix is the missing half of the release bump: versionCode 42 / versionName
0.4.15, plus the changelog files named after the code (distribution/ for the
record, fastlane/ for F-Droid).

check-version-parity.mjs now also requires distribution/changelogs/<code>.txt
to exist and to describe the version being released, and the fastlane copy to
exist. A stale versionCode is otherwise internally consistent and silent;
verified it discriminates — code 41 with version 0.4.15 fails, 42 passes.

Tests: npm test 320 pass.

Co-authored-by: engineer <engineer@macbookpro.lan>
Co-authored-by: Paperclip <noreply@paperclip.ing>
This commit is contained in:
Den
2026-08-14 10:33:38 -07:00
committed by GitHub
parent f564869eee
commit c43ec27a8c
5 changed files with 44 additions and 3 deletions

View File

@@ -94,8 +94,8 @@ android {
applicationId 'cc.agentlabs.opencode' applicationId 'cc.agentlabs.opencode'
minSdkVersion rootProject.ext.minSdkVersion minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 41 versionCode 42
versionName "0.4.14" versionName "0.4.15"
buildConfigField "String", "REACT_NATIVE_RELEASE_LEVEL", "\"${findProperty('reactNativeReleaseLevel') ?: 'stable'}\"" buildConfigField "String", "REACT_NATIVE_RELEASE_LEVEL", "\"${findProperty('reactNativeReleaseLevel') ?: 'stable'}\""
} }

View File

@@ -35,7 +35,7 @@
}, },
"android": { "android": {
"package": "cc.agentlabs.opencode", "package": "cc.agentlabs.opencode",
"versionCode": 41, "versionCode": 42,
"usesCleartextTraffic": true, "usesCleartextTraffic": true,
"adaptiveIcon": { "adaptiveIcon": {
"foregroundImage": "./assets/adaptive-icon.png", "foregroundImage": "./assets/adaptive-icon.png",

View File

@@ -0,0 +1,5 @@
v0.4.15 — The app now tells you when a new version is out
• Installs from a downloaded APK, F-Droid or a mirror had no way to learn a newer version existed. The app now checks once a day and shows a dismissible banner when one is available.
• "Not now" is remembered for that version only.
• Settings now shows the version you are actually running instead of a hard-coded placeholder.

View File

@@ -0,0 +1,5 @@
v0.4.15 — The app now tells you when a new version is out
• Installs from a downloaded APK, F-Droid or a mirror had no way to learn a newer version existed. The app now checks once a day and shows a dismissible banner when one is available.
• "Not now" is remembered for that version only.
• Settings now shows the version you are actually running instead of a hard-coded placeholder.

View File

@@ -23,6 +23,37 @@ if (code !== expectedCode) {
errors.push(`Gradle versionCode ${Number.isNaN(code) ? "missing" : code} != app.json versionCode ${expectedCode}`); errors.push(`Gradle versionCode ${Number.isNaN(code) ? "missing" : code} != app.json versionCode ${expectedCode}`);
} }
// A versionCode left at the previous release's value is the silent half of this
// failure: version metadata is internally consistent, Play still accepts the
// upload (CI overrides the code with run_number+100), but the F-Droid repo and
// every direct-APK install key upgrades off versionCode — so a 0.4.15 APK
// carrying 0.4.14's code is never offered to the cohort it was cut for.
// The changelog file is named after the versionCode and its first line names
// the version, so requiring the two to agree pins the code to this release.
const changelogPath = `distribution/changelogs/${expectedCode}.txt`;
let changelog = null;
try {
changelog = await readFile(changelogPath, "utf8");
} catch {
errors.push(`${changelogPath} is missing — every release needs a changelog named after its versionCode`);
}
if (changelog !== null) {
const firstLine = changelog.split("\n", 1)[0].trim();
if (!firstLine.startsWith(`v${expectedName}`)) {
errors.push(
`${changelogPath} describes "${firstLine}", not v${expectedName} — versionCode ${expectedCode} belongs to an earlier release, so bump it`,
);
}
}
const fastlanePath = `fastlane/metadata/android/en-US/changelogs/${expectedCode}.txt`;
try {
await readFile(fastlanePath, "utf8");
} catch {
errors.push(`${fastlanePath} is missing — F-Droid reads its release notes from here`);
}
if (errors.length) { if (errors.length) {
console.error(errors.join("\n")); console.error(errors.join("\n"));
process.exitCode = 1; process.exitCode = 1;