aboutsummaryrefslogtreecommitdiffhomepage
path: root/docs/chapters/import.sgml
diff options
context:
space:
mode:
authorJonas Meurer <jonas@freesources.org>2016-11-04 13:01:06 +0100
committerGuido Günther <agx@sigxcpu.org>2016-11-04 14:36:09 +0100
commitdd5c3bcaf5125f40a8a3a84d64c1d25de26e5584 (patch)
treed72f0356ae6f2125532d85b04127475be43bda55 /docs/chapters/import.sgml
parent36b8a58ae289db0f9dea8328c9472c1bb166c4d4 (diff)
Add version mangling
This allows to replace characters in upstream version numbers. I.e. replace '-' by '.'. Closes: #842638
Diffstat (limited to 'docs/chapters/import.sgml')
-rw-r--r--docs/chapters/import.sgml25
1 files changed, 25 insertions, 0 deletions
diff --git a/docs/chapters/import.sgml b/docs/chapters/import.sgml
index e58cca98..559a14a1 100644
--- a/docs/chapters/import.sgml
+++ b/docs/chapters/import.sgml
@@ -260,6 +260,31 @@ upstream-tag = v%(version)s
</para>
<sect3>
+ <title>Upstream tag version mangling</title>
+ <para>
+ Since version 0.8.7, &gbp-buildpackage; supports basic version mangling for upstream tags via
+ substitution. The substitution syntax is as follows:
+ </para>
+<programlisting>
+[git-buildpackage]
+upstream-tag = v%(version%A%B)s
+</programlisting>
+ <para>
+ In this example, each occurrence of <replaceable>A</replaceable> will be replaced by <replaceable>B</replaceable>
+ in the upstream version number. An occasional upstream format is to use tag <replaceable>v1_2_3</replaceable>
+ for release <replaceable>1.2.3</replaceable>. Use <replaceable>v%(version%.%_)s</replaceable> to transform
+ <replaceable>1.2.3</replaceable> into <replaceable>v1_2_3</replaceable>.
+ </para>
+ <para>
+ If you need to use the <replaceable>%</replaceable> character in either of the substitution strings,
+ you have to escape it. E.g. <replaceable>%(version%-%\%)s</replaceable> will replace <replaceable>-</replaceable> with
+ <replaceable>%</replaceable>, transforming <replaceable>1-A.B.C</replaceable> to <replaceable>1%A.B.C</replaceable>.
+ <replaceable>%(version%\%%.)s</replaceable> on the other hand will replace <replaceable>%</replaceable> with
+ <replaceable>.</replaceable>, turning <replaceable>X%Y%Z</replaceable> into <replaceable>X.Y.Z</replaceable>.
+ </para>
+ </sect3>
+
+ <sect3>
<title>Step by step</title>
<para>To not make any assumptions about &gbp;'s configuration, the following steps have all options given
in its long versions on the command line. You can add these