Will F-Droid app update automatically in F-Droid server from GitHub release?

I have published an app in F-Droid. When publishing the first version, I followed the usual steps, and the app was published from my GitHub release. (The release tag is v1.0).

Now, I have released an update of the app in GitHub (The release tag is v1.x). And I'm wondering if I need to change anything in the F-Droid metadata and create a new merge request again in the F-Droid data repository.

This is the metadata .yml of my app:

Categories:
  - Science & Education
License: BSD-3-Clause
AuthorName: ARITRA BELEL and SHOURYA S GHOSH
SourceCode: https://github.com/belelaritra/Neumorphic_Calculator
IssueTracker: https://github.com/belelaritra/Neumorphic_Calculator/issues

AutoName: Calculator

RepoType: git
Repo: https://github.com/belelaritra/Neumorphic_Calculator

Builds:
  - versionName: 1.0.0
    versionCode: 1
    commit: b0ea287db768c146925b7df4853abe10286b8026
    output: build/app/outputs/flutter-apk/app-release.apk
    srclibs:
      - [email protected]
    rm:
      - ios
    build:
      - $$flutter$$/bin/flutter config --no-analytics
      - $$flutter$$/bin/flutter packages pub get
      - $$flutter$$/bin/flutter build apk

AutoUpdateMode: Version %v
UpdateCheckMode: Tags
UpdateCheckData: pubspec.yaml|version:\s.*\+(\d+)|.|version:\s(.*)\+
CurrentVersion: 1.0.0
CurrentVersionCode: 1

The lines,

AutoUpdateMode: Version %v
UpdateCheckMode: Tags

have actually caught my attention. It seems the mode is set to auto-update. But the last 2 lines actually confuse me, where the CurrentVersion and CurrentVersionCode has already been set. If I don't update this, will my app be auto-updated in the repository even if the auto-update mode is set to true?

Note: I've updated the version name and version code in my project in the release as well. Now the version name is 1.1.0 and the version code is 2.


Solution 1:

You do not need to tell F-Droid to update your app - it will do so automatically:

Do I need to tell you when I update?

We will detect new releases of your app and update our metadata accordingly, which will then cause us to check the code and add new builds to our system. Tags help greatly for adding new versions, but do remember to push the tags to the origin repo each time. Of course, if you move source code to a different website, you should tell us. There are currently some issues around detecting new versions when the AndroidManifest.xml is moved so if there is some urgency, you can let us know if that happens.

Some app developers submit merge requests to us with all the relevant build data when they release. You don’t need to do this, but it can speed things up. Historically, as a small community project, we have been slower to process updates than we’d like to be, but this situation is improving all the time.

Our update checks are dumb and just scrape build files: We do not run any build code, so do not use time-based versioning or any other sort of calculating your version at build time (e.g. moving them to multiple subversions that get concatenated at build or even having complex function calls to do this).

I’ve published a new release. Why is it not in the repository?

When we detect a new release, it may take a few days to make it into the repository as the build process runs only once a day. Before the build has completed, the wiki page for your app will list it in :Category:Apps to Update. As long as the text under Versions stating “The current (recommended) version is xxx (version code yyy)” shows the version numbers corresponding to your latest release, we detected it and the APK should be available soon. Just give it some time.

Regarding the CurrentVersion and CurrentVersionCode values in the metadata, my understanding is that F-Droid's updating scripts update them automatically to the current values:

The F-Droid tools can automatically detect and build updates to apps and packages.

Detecting

There are various mechanisms in place for automatically detecting that updates are available for applications, with the UpdateCheckMode field in the metadata determining which method is used for a particular application.

Running the fdroid checkupdates command will apply this method to each application in the repository and update the CurrentVersion and CurrentVersionCode fields in the metadata accordingly.