发布跟踪

什么是跟踪?

Bloom 在首次发布软件包时需要用户输入配置信息。将这些配置存储在发布仓库中是有益的,这样我们就不必为后续发布手动输入不会更改的配置信息。

由于在为不同的 ROS 发行版发布软件包时,某些配置会有所不同,bloom 使用**发布轨道来存储每个发行版的发布配置**。按照惯例,应该使用与要发布的 ROS 发行版名称相同的轨道名称来创建轨道。

所有发布轨道的配置信息存储在发布仓库的主分支上的 tracks.yaml 文件中。

轨道配置

更详细地解释了与bloom一起使用的跟踪配置。

发布存储库网址

这是您发布存储库的网址,如果您的发布存储库托管在ros2-gbp上,它应该采用``https://github.com/ros2-gbp/my_repo-release.git``的形式。

No reasonable default release repository url could be determined from previous releases.
Release repository url [press enter to abort]:

粘贴您的发布存储库网址并按Enter键。

此外,Bloom可能会询问您有关初始化新存储库的情况,如下所示:

Freshly initialized git repository detected.
An initial empty commit is going to be made.
Continue [Y/n]?

只需按回车键接受默认的是。

存储库名称

存储库名称很简单,但建议将其设置为您的项目名称。

Repository Name:
   upstream
      Default value, leave this as upstream if you are unsure
   <name>
      Name of the repository (used in the archive name)
   ['upstream']:

输入项目名称(例如 my_project)并按 Enter 键。

上游存储库 URI

上游存储库 是您的源代码所在的存储库。这很可能是指指向托管在 GitHub 或 GitLab 等 git 托管服务上的项目的 https 链接。

Upstream Repository URI:
   <uri>
      Any valid URI. This variable can be templated, for example an svn url
      can be templated as such: "https://svn.foo.com/foo/tags/foo-:{version}"
      where the :{version} token will be replaced with the version for this release.
   [None]:

确保**使用 https 地址**(例如 https://github.com/my_organization/my_repo.git),而不是 ssh 地址。

上游版本控制系统类型

这是`上游仓库URI`_的版本控制系统(VCS)类型。您必须指定仓库使用的VCS类型,可以选择``svn``、githg``或``tar

Upstream VCS Type:
   svn
      Upstream URI is a svn repository
   git
      Upstream URI is a git repository
   hg
      Upstream URI is a hg repository
   tar
      Upstream URI is a tarball
   ['git']:

大多数仓库将使用git,但某些旧版本仓库可能使用hg或svn。

版本

这是您发布的软件包的版本。(例如,1.0.3)

Version:
   :{ask}
      This means that the user will be prompted for the version each release.
      This also means that the upstream devel will be ignored.
   :{auto}
      This means the version will be guessed from the devel branch.
      This means that the devel branch must be set, the devel branch must exist,
      and there must be a valid package.xml in the upstream devel branch.
   <version>
      This will be the version used.
      It must be updated for each new upstream version.
   [':{auto}']:

将其设置为``:{auto}``(默认设置,推荐使用)将自动从devel分支的package.xml文件中确定版本。

将其设置为``:{ask}``将在每次使用bloom进行发布时弹出提示,要求您输入版本号。

发布标签

发布标签(Release Tag)是指您要从中导入代码的标签或分支。

Release Tag:
   :{version}
      This means that the release tag will match the :{version} tag.
      This can be further templated, for example: "foo-:{version}" or "v:{version}"

      This can describe any vcs reference. For git that means {tag, branch, hash},
      for hg that means {tag, branch, hash}, for svn that means a revision number.
      For tar this value doubles as the sub directory (if the repository is
      in foo/ of the tar ball, putting foo here will cause the contents of
      foo/ to be imported to upstream instead of foo itself).
   :{ask}
      This means the user will be prompted for the release tag on each release.
   :{none}
      For svn and tar only you can set the release tag to :{none}, so that
      it is ignored.  For svn this means no revision number is used.
   [':{version}']:

将其设置为 ``:{version}``(默认设置,也是推荐设置)将使发布标签与版本标签匹配。

一种较少见的设置是将其设置为分支名称,以便始终在发布时从上游项目中拉取该分支。

或者,如果您希望每次发布时都提示输入不同的标签,请输入 :{ask}:{ask} 在上游项目频繁进行标记发布并且您希望每次发布时引用新的标签时很有用。

上游开发分支

上游开发分支是你的:ref:上游存储库 <upstream-repository-uri>`中分支的名称。如果你为每个ROS发行版使用单独的分支,那么每个发布跟踪的这个字段都会不同。它用于确定在设置:ref:`版本`为`:{auto}``时你正在发布的软件包的版本。

Upstream Devel Branch:
   <vcs reference>
      Branch in upstream repository on which to search for the version.
      This is used only when version is set to ':{auto}'.
   [None]:

要从名为``humble``的分支发布,请输入``humble``。将其保留为``None``将导致版本从存储库的默认分支确定(不建议这样做)。

ROS发行版

这是你计划发布软件包的发行版。

ROS Distro:
   <ROS distro>
      This can be any valid ROS distro, e.g. indigo, kinetic, lunar, melodic
   ['indigo']:

如果你计划发布到ROS humble,请输入``humble``。

补丁目录

这是用于发布版本的任何额外补丁的目录。

Patches Directory:
   <path in bloom branch>
      This can be any valid relative path in the bloom branch. The contents
      of this folder will be overlaid onto the upstream branch after each
      import-upstream.  Additionally, any package.xml files found in the
      overlay will have the :{version} string replaced with the current
      version being released.
   :{none}
      Use this if you want to disable overlaying of files.
   [None]:

将额外的补丁添加到发布版本是一个很少使用的功能。对于几乎所有软件包,应该将其保留为默认值 None

发布存储库推送 URL

Release Repository Push URL:
   :{none}
      This indicates that the default release url should be used.
   <url>
      (optional) Used when pushing to remote release repositories. This is only
      needed when the release uri which is in the rosdistro file is not writable.
      This is useful, for example, when a releaser would like to use a ssh url
      to push rather than a https:// url.
   [None]:

在大多数情况下,可以将其保留为默认值。