Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,8 @@ android {
applicationId 'cc.agentlabs.opencode'
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 41
versionName "0.4.14"
versionCode 42
versionName "0.4.15"

buildConfigField "String", "REACT_NATIVE_RELEASE_LEVEL", "\"${findProperty('reactNativeReleaseLevel') ?: 'stable'}\""
}
Expand Down
2 changes: 1 addition & 1 deletion app.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
},
"android": {
"package": "cc.agentlabs.opencode",
"versionCode": 41,
"versionCode": 42,
"usesCleartextTraffic": true,
"adaptiveIcon": {
"foregroundImage": "./assets/adaptive-icon.png",
Expand Down
5 changes: 5 additions & 0 deletions distribution/changelogs/42.txt
Original file line number Diff line number Diff line change
@@ -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.
5 changes: 5 additions & 0 deletions fastlane/metadata/android/en-US/changelogs/42.txt
Original file line number Diff line number Diff line change
@@ -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.
31 changes: 31 additions & 0 deletions scripts/check-version-parity.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,37 @@ if (code !== 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) {
console.error(errors.join("\n"));
process.exitCode = 1;
Expand Down
Loading