Skip to content

Prepare 1.0.5 and automate cutting a release - #30

Merged
SibtainOcn merged 1 commit into
mainfrom
release/1.0.5
Sep 3, 2026
Merged

SibtainOcn merged 1 commit into
mainfrom
release/1.0.5

Conversation

@SibtainOcn

@SibtainOcn SibtainOcn commented Sep 3, 2026

Copy link
Copy Markdown
Owner

Version codes

HAZEL_VERSION_CODE goes to 2, so the release publishes 200 to 204. v1.0.4 shipped 100 to 104, and an APK whose code did not increase is one Android refuses to install over the last.

fdroidserver catches this itself, which is how it was found:

ERROR: Unexpected version/version code in output; APK: '1.0.5' / '104', Expected: '1.0.5' / '204'

The version name moves into gradle.properties

A tag build still overrides it with -PVERSION_NAME, so a release is still named by the tag that produced it. The fallback matters because F-Droid's builder is handed a checkout and a tag, never a build argument. Without it the APK comes out named Hazel-v1.0.0-... and no output: line can match.

Verified with no -P arguments at all, which is how F-Droid builds:

ABI versionCode versionName
universal 200 1.0.5
armeabi-v7a 201 1.0.5
x86 202 1.0.5
x86_64 203 1.0.5
arm64-v8a 204 1.0.5

The recipe becomes auto-updatable

AutoUpdateMode: Version means F-Droid adds each new release to the recipe themselves, by copying the last five entries and changing only versionName, versionCode and commit. Reading checkupdates.py confirms it rewrites nothing else, so:

  • output: now uses $$VERSION$$, which is substituted at build time
  • gradleprops: is gone, since a literal VERSION_NAME=1.0.5 in it would be carried into 1.0.6 unchanged
  • output: is relative to subdir:, which is already app/. The old app/build/... resolved to app/app/build/... and failed with "No apks match" straight after a build that had in fact succeeded

Without this, every future release would need the recipe edited by hand in F-Droid's repository.

tools/release.ps1

Cuts a release in one step: bumps both versions, promotes the Unreleased section, generates a store changelog per architecture, commits, tags, pushes. Refuses to start on a dirty tree or an existing tag, warns when not on main, and -DryRun prints the plan without touching anything.

Store changelogs

Regenerated as 200-204. The old 100-104 are removed: v1.0.4 predates the foojay fix, so F-Droid can never build it and those files would describe a version that never appears there.

Where the F-Droid dry run got to

fdroid lint clean. fdroid build reaches Successfully built version 1.0.5 of com.hazel.android after five minutes of real compilation. The remaining failures were all recipe or version-code mismatches, fixed here.

One item is not ours: fdroidserver 2.4.5, the current release, ships no SHA-256 for any Gradle 9.x and Hazel needs 9.5.0 for AGP 9.3.2. Supplying the official checksum locally made it build, so it is one line upstream rather than a change here.

Bumps the version code to 2, so the release publishes APKs numbered
200 to 204. v1.0.4 shipped 100 to 104, and a code that does not increase
produces an APK Android will not install over the last one.

Moves the version name into gradle.properties. A tag build still
overrides it, but F-Droid's builder is handed a checkout and a tag and
never a build argument, so the version has to be in the repository for
the APK to be named correctly. Verified: with no -P arguments the
manifests come out 1.0.5 at codes 200 to 204.

The recipe now uses $$VERSION$$ in output: and carries no gradleprops.
F-Droid adds each new release by copying these entries and changing only
the version and the commit, so a literal version in either field would be
carried forward into a release it does not belong to. output: is also
relative to subdir:, which app/build/... was not.

Adds tools/release.ps1, which does all of the above in one step for the
next release, and refuses to run on a dirty tree or an existing tag.
@SibtainOcn
SibtainOcn merged commit ab56dbd into main Sep 3, 2026
3 checks passed
@SibtainOcn
SibtainOcn deleted the release/1.0.5 branch September 3, 2026 07:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant