Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 31 additions & 4 deletions xml/obs_build_config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -726,12 +726,39 @@ Support: pax debbuild</screen>
</listitem>
</varlistentry>
<varlistentry xml:id="vl-prjconfig-release">
<term><parameter>Release: <replaceable>CI_CNT</replaceable> <replaceable>B_CNT</replaceable></parameter> (RPM only)</term>
<term><parameter>Release: <replaceable>TEMPLATE</replaceable>
[<replaceable>TYPE:TEMPLATE</replaceable> ...]</parameter></term>
<listitem>
<para>
<command>CI_CNT</command> is the number of commits.
<command>B_CNT</command> is the number of rebuilds.
The default is <command>CI_CNT.B_CNT</command>.
Defines the template used to generate release numbers. This setting is
supported for most build formats, not only RPM.
</para>
<para>
The placeholders <literal>&lt;CI_CNT&gt;</literal> and <literal>&lt;B_CNT&gt;</literal>
are replaced with the check-in (source change) counter and the build counter, respectively.
The default template is <literal>&lt;CI_CNT&gt;.&lt;B_CNT&gt;</literal>.
</para>
<para>
In build recipes, the <literal>&lt;RELEASE&gt;</literal> tag is a shortcut for the
generated release number, which is <literal>&lt;CI_CNT&gt;.&lt;B_CNT&gt;</literal>
by default. For example, it can be used in the <literal>Release:</literal> line of
a spec file or in container tags.
</para>
<para>
The first template is the default for build types without an override.
To override it for a specific build type, append a space-separated
<literal><replaceable>TYPE</replaceable>:<replaceable>TEMPLATE</replaceable></literal> entry.
Use build type names, such as <literal>spec</literal> for RPM packages,
<literal>dsc</literal> for Debian packages, or <literal>docker</literal> for Docker containers.
For example:
</para>
<screen>Release: &lt;CI_CNT&gt;.&lt;B_CNT&gt; spec:160150.&lt;CI_CNT&gt;.&lt;B_CNT&gt;</screen>
<para>
This configuration adds the <literal>160150.</literal> prefix only to RPM release numbers.
Other build types use <literal>&lt;CI_CNT&gt;.&lt;B_CNT&gt;</literal>.
For a check-in counter of <literal>3</literal> and a build counter of <literal>2</literal>,
the release is <literal>160150.3.2</literal> for RPM builds and <literal>3.2</literal>
for other build types.
</para>
</listitem>
</varlistentry>
Expand Down