Skip to content
This repository was archived by the owner on May 23, 2025. It is now read-only.

Conversation

@nailyk-fr
Copy link
Collaborator

@nailyk-fr nailyk-fr commented May 10, 2024

Due to Android (and the F-Droid) upgrade process, versionCode should always increase in order to trigger the update process.

Use a dedicated versionCode for Green releases, time base, which will always increase (beware of time zones ⚠️ )

Another side effect will be: the same code, rebuilt, will be considered as an upgrade, as build time will be newer.

It is impossible to use the commit number as it is not an int. A better idea would be to count the amounts of commits, with something like git rev-list --first-parent --count HEAD but I didn't manage to do it.

versionName remains the same, with the commit number, but versionCode increases, offering an update on every build :

image

signal-2024-05-10-182448_002

Due to Android (and the F-Droid) upgrade process, `versionCode` should always increase in order to trigger the update process. 

Use a dedicated `versionCode` for Green releases, time base, which will always increase (beware of time zones ⚠️ )

Another side effect will be: the same code, rebuilt, will be considered as an upgrade, as build time will be newer. 

It is impossible to use the commit number as it is not an `int`. 
A better idea would be to count the amounts of commits, with something like  `git rev-list --first-parent --count HEAD` but I didn't manage to do it.
@connyduck
Copy link
Collaborator

I don't like this as I often install older builds over newer ones and that only works when they have the same versionCode. Also it probably breaks Google Play nightly builds. Why can't you run a script that changes the versionCode before building? Something like this.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants