Skip to content

Git tag format

olf edited this page May 21, 2023 · 18 revisions

This is a copy of the same page at the Storeman Installer wiki, except for the exemplary RPM names.

Summary

From 18 May 2023 on, for releases Git tags are used which must conform to releaseN/<version>, with <version> being a semantic version the Version: tag is set to (i.e., content of %{version}), plus releaseN set for the RPM Release: tag (i.e., content of %{release}) with N being a natural number ≥ 1. For example, release5/0.3.1 is a valid release tag name, which results at the SailfishOS-OBS (build.sailfishos.org) in, e.g., sfos-upgrade-0.3.1-1.13.1.jolla.armv7hl.rpm as the resulting RPM file name, with its spec file initially containing Version: 0.3.1 and Release: release5, but the release string is overwritten later in the build process.

Similarly alpha, beta or release candidate (rc) versions are tagged as {alpha|beta|rc}N/<version> (e.g., beta5/0.3.0) and Release: set to {alpha|beta|rc}N, which results at Jolla's SailfishOS-OBS in, e.g., sfos-upgrade-0.3.0-1.7.1.jolla.armv7hl.rpm.

Note that the Release: field must always be altered for GitHub (i.e., no two {alpha|beta|rc|release}N releases are allowed to exist for the same Version:) to achieve the correct order of releases, while the SailfishOS-OBS will do that automatically, but separately for each OBS repository!

{alpha|beta|rc|release} denotes the expected status of the software. Hence other status identifiers such as adud may be used to not trigger a build at GitHub and specific SailfishOS-OBS repositories, if the corresponding CI workflows are configured correspondingly (as they should). Mind the sorting: adud < alpha

Requirements

  • There must be an identifier in the Git tag names for releases, because Git tags are global for a Git repository, i.e., one cannot use the same tag name multiple times. Hence simply prepend the release version to the version proper with a slash (/) in between for that.
  • Have the regular %version from the spec file in the tag names, because that is how the RPMs built at GitHub are named.
  • [Non-requirement] It is very useful to also use %release in the Git tag names, but the classical use in the form of %version-%release does not work if both, SailfishOS-OBS and compiling using the unaltered spec file shall be supported. Hence the %release string is used as tag prefix as denoted above.

Analysis of tar_git

Documented in the Storeman Wiki.

Clone this wiki locally