简体   繁体   English

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

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

I have published an app in F-Droid.我在 F-Droid 中发布了一个应用程序 When publishing the first version, I followed the usual steps, and the app was published from my GitHub release.在发布第一个版本时,我按照通常的步骤,从我的 GitHub 版本发布了该应用程序。 (The release tag is v1.0 ). (发布标签是v1.0 )。

Now, I have released an update of the app in GitHub (The release tag is v1.x ).现在,我在 GitHub 中发布了应用程序的更新(发布标签为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.我想知道是否需要更改 F-Droid 元数据中的任何内容并在 F-Droid 数据存储库中再次创建新的合并请求。

This is the metadata.yml of my app:这是我的应用程序的 metadata.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

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.但最后两行实际上让我感到困惑,其中CurrentVersionCurrentVersionCode已经设置。 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?如果我不更新它,即使自动更新模式设置为 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 .现在版本名称为1.1.0 ,版本代码为2

You do not need to tell F-Droid to update your app - it will do so automatically : 您无需告诉 F-Droid 更新您的应用程序 - 它会自动更新

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.目前,在移动 AndroidManifest.xml 时检测新版本存在一些问题,因此如果有紧急情况,您可以告诉我们是否发生这种情况。

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 (eg moving them to multiple subversions that get concatenated at build or even having complex function calls to do this).我们的更新检查是愚蠢的,只是抓取构建文件:我们不运行任何构建代码,所以不要在构建时使用基于时间的版本控制或任何其他类型的计算版本(例如,将它们移动到在构建时连接的多个子版本甚至有复杂的 function 调用来执行此操作)。

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.在构建完成之前,您的应用程序的 wiki 页面会将其列在:类别:要更新的应用程序中。 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.只要“当前(推荐)版本为 xxx(版本代码 yyy)”的 Versions 下的文字显示与您的最新版本对应的版本号,我们就检测到它,并且该 APK 应该很快就会可用。 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 :关于元数据中的CurrentVersionCurrentVersionCode值,我的理解是F-Droid 的更新脚本会自动将它们更新为当前值

The F-Droid tools can automatically detect and build updates to apps and packages. F-Droid 工具可以自动检测和构建应用程序和包的更新。

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.有多种机制可以自动检测应用程序是否有可用的更新,元数据中的 UpdateCheckMode 字段确定用于特定应用程序的方法。

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.运行 fdroid checkupdates 命令会将此方法应用于存储库中的每个应用程序,并相应地更新元数据中的 CurrentVersion 和 CurrentVersionCode 字段。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM