分支命名规则

我们的约定好分支命名规则确保软件可以由我们的 CI 构建,并由其他开发人员轻松测试。

每个 Git 仓库的 README 文件都应说明所使用的分支命名规范,以及与规范的偏差。

一键安装包

Software exclusively distributed as a click-package (and not also as a DEB) only uses one master branch that is protected. Separate temporary development branches with arbitrary descriptive names can be created and merged into master when the time comes. Ideally Git tags or GitHub releases should be used to mark and archive milestones in the development history.

DEB Packages

为了帮助我们尽可能轻松地将代码交付到 Ubuntu Touch 中,我们的 CI 会根据分支名称自动将我们的 Git 仓库构建到 http://repo.ubports.com/ 托管的多个 APT 档案中。

我们在 Git 仓库中维护以下分支:

Git 分支

说明

相应的 APT 档案

名称

基础发行版

main, ubports/latest

代表 Ubuntu Touch 的最新开发成果。该分支允许所有类型的更改。

devel-<Ubuntu LTS> (例如 devel-noble)

最新或即将推出的 Ubuntu LTS。

devel-debian

Debian 实验版。

ubports/<主版本>.x (例如 ubports/24.6.x)

代表特定主要版本中的代码。它在主要版本发布前从 main 分支分支出来,并将成为该主要版本发布的一部分。该分支只允许进行错误修复和非破坏性修改。

<major version>.x (e.g. 24.6.x)

在分枝Ubuntu LTS的时候

ubports/focal

A special case of ubports/<major version>.x, which is branched after the release of Ubuntu Touch 20.04 OTA-4.

focal

Ubuntu 20.04 LTS.

ubports/focal_-_<ext>

使用已废弃的 “分支扩展 ”系统进行跨组件更改的分支。不再推荐使用。

focal_-_<ext>

Ubuntu 20.04 LTS.

personal/<user>/<name>, 以及任何其他分支.

所有其他分支可用于提出合并请求或其他原因。除非提出合并请求,否则 CI 不会构建这些分支。

不适用,除非提议作为对上述分支的MR(见下文)。

To ensure the main branch doesn’t miss any changes, all changes must be made against main branch first before backporting to the major release branches. An exception is when a change is not applicable to the main branch anymore due to other changes in that branch.

备注

If the next development version is not available for testing yet, and you need the change to be made available for install for testing, it’s allowed to temporarily target the changeset to the major version branch to get packages built against that version. When the changeset is ready for merge, the changeset must be re-targeted to the main branch.

APT archives for Merge Requests

In addition to archives mentioned above, we also create APT archives for MRs made against our Git repositories. This allows us to test the result of the build on real devices using ubports-qa before merging the code. For each MR, the CI will build the code against all the same targets as the MR’s target branch, and then will append _-_PR_<repository name>_<MR number> to them [1]. For example:

  • An MR numbered 100 made against the main branch of Git repository lomiri (when the current Ubuntu LTS is noble) will have APT archives named devel-noble_-_PR_lomiri_100 and devel-debian_-_PR_lomiri_100.

  • An MR numbered 125 made against the ubports/24.6.x branch of Git repository morph-browser will have an APT archive named 24.6.x_-_PR_morph-browser_125.