Prepare 1.0.5 and automate cutting a release - #30
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Version codes
HAZEL_VERSION_CODEgoes 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:
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 namedHazel-v1.0.0-...and nooutput:line can match.Verified with no
-Parguments at all, which is how F-Droid builds:The recipe becomes auto-updatable
AutoUpdateMode: Versionmeans F-Droid adds each new release to the recipe themselves, by copying the last five entries and changing onlyversionName,versionCodeandcommit. Readingcheckupdates.pyconfirms it rewrites nothing else, so:output:now uses$$VERSION$$, which is substituted at build timegradleprops:is gone, since a literalVERSION_NAME=1.0.5in it would be carried into 1.0.6 unchangedoutput:is relative tosubdir:, which is alreadyapp/. The oldapp/build/...resolved toapp/app/build/...and failed with "No apks match" straight after a build that had in fact succeededWithout 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
-DryRunprints 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 lintclean.fdroid buildreachesSuccessfully built version 1.0.5 of com.hazel.androidafter 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.