从 GitHub 版本开始,F-Droid 应用程序会在 F-Droid 服务器中自动更新吗?

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

我在 F-Droid 中发布了 app。发布第一个版本时,我遵循了通常的步骤,应用程序是从我的 GitHub 版本发布的。 (发布标签是v1.0)。

现在,我已经在 GitHub 发布了应用程序的更新(发布标签是 v1.x)。我想知道是否需要更改 F-Droid 元数据中的任何内容并在 F-Droid 数据存储库中再次创建新的合并请求。

这是我的应用程序的元数据 .yml:

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:
      - flutter@2.8.1
    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

行,

AutoUpdateMode: Version %v
UpdateCheckMode: Tags

确实引起了我的注意。似乎模式设置为自动更新。但是最后两行实际上让我感到困惑,其中 CurrentVersionCurrentVersionCode 已经设置好了。如果我不更新它,即使自动更新模式设置为 true,我的应用程序是否会在存储库中自动更新?

注意:我在发布时也更新了我的项目中的版本名称和版本代码。现在版本名称是 1.1.0 版本代码是 2.

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.

关于元数据中的CurrentVersionCurrentVersionCode值,我的理解是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.