aboutsummaryrefslogtreecommitdiffhomepage
path: root/docs/manpages/gbp-tag.xml
blob: e8a2e3089c2cbd260fe2428381f8273e2e445e0c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
<refentry id="man.gbp.tag">
  <refentryinfo>
    <address>
      &dhemail;
    </address>
    <author>
      &dhfirstname;
      &dhsurname;
    </author>
  </refentryinfo>
  <refmeta><refentrytitle>gbp-tag</refentrytitle>
    &dhsection;
  </refmeta>
  <refnamediv>
    <refname>gbp-tag</refname>
    <refpurpose>Tag a &debian; packages in a &git; repository</refpurpose>
  </refnamediv>
  <refsynopsisdiv>
    <cmdsynopsis>
      &gbp-tag;

      &man.common.options.synopsis;
      <arg><option>--ignore-branch</option></arg>
      <arg><option>--[no-]ignore-new</option></arg>
      <arg><option>--[no-]sign-tags</option></arg>
      <arg><option>--keyid=</option><replaceable>GPG-KEYID</replaceable></arg>
      <arg><option>--debian-branch=</option><replaceable>BRANCH_NAME</replaceable></arg>
      <arg><option>--debian-tag=</option><replaceable>tag-format</replaceable></arg>
      <arg><option>--debian-tag-msg=</option><replaceable>tag-msg-format</replaceable></arg>
      <arg><option>--posttag=</option><replaceable>COMMAND</replaceable></arg>
      <arg><option>--retag</option></arg>
    </cmdsynopsis>
  </refsynopsisdiv>
  <refsect1>
    <title>DESCRIPTION</title>
    <para>
      &gbp-tag; tags the current head commit appropriately. It will in order:
    </para>
    <itemizedlist>
      <listitem>
        <para>
          Verify that it is being executed from the Debian branch.
        </para>
      </listitem>
      <listitem>
        <para>
          Verify that the repository doesn't contain any uncommitted source
          changes.
        </para>
      </listitem>
      <listitem>
        <para>
	  Create a git tag using the information from <filename>debian/changelog</filename>.
        </para>
      </listitem>
      <listitem>
        <para>
          (Optionally) call a post tag hook.
        </para>
      </listitem>
    </itemizedlist>
  </refsect1>
  <refsect1>
    <title>OPTIONS</title>
    <variablelist>
      &man.common.options.description;
      <varlistentry>
        <term><option>--posttag=</option><replaceable>COMMAND</replaceable>
        </term>
        <listitem>
          <para>
            Execute <replaceable>COMMAND</replaceable> after creating the tag.
          </para>
          <para>
            Exported environment variables are: <envar>GBP_TAG</envar> (the name
            of the generated tag), <envar>GBP_BRANCH</envar> (the branch the
            package was built from) and <envar>GBP_SHA1</envar> (the sha1 of the
            commit the tag was created at).
          </para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term><option>--[no-]sign-tags</option>
        </term>
        <listitem>
          <para>
            GPG sign all created tags.
          </para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term><option>--keyid=</option><replaceable>GPG-KEYID</replaceable>
        </term>
        <listitem>
          <para>
            Use this keyid for gpg signing tags.
          </para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term><option>--debian-tag=</option><replaceable>TAG-FORMAT</replaceable>
        </term>
        <listitem>
          <para>
            Use this tag format when tagging &debian; versions, default is
            <replaceable>debian/%(version)s</replaceable>.
          </para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term><option>--debian-tag-msg=</option><replaceable>tag-msg-format</replaceable>
        </term>
        <listitem>
          <para>Use this tag message format when signing &debian; versions,
            default is <replaceable>%(pkg)s Debian release %(version)s</replaceable></para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term><option>--retag</option>
        </term>
        <listitem>
          <para>
            Don't fail tag operations if a tag with the same version
            already exists. This is a command line only option that
            cannot be specified via &gbp.conf;.
          </para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term><option>--debian-branch</option>=<replaceable>BRANCH_NAME</replaceable>
        </term>
        <listitem>
          <para>
            If you're not on this branch when invoking &gbp-tag; it will
            fail. Default is <replaceable>master</replaceable>. This is done to
            make sure you don't accidentally tag on the wrong branch.  Not
            being on this branch will be ignored when using
            <option>--ignore-branch</option>.
          </para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term><option>--ignore-branch</option>
        </term>
        <listitem>
          <para>
            Don't check if the current branch matches
            <replaceable>DEBIAN-BRANCH</replaceable>.
          </para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term><option>--[no-]ignore-new</option>
        </term>
        <listitem>
          <para>
            Don't abort if there are uncommitted changes in the source tree or
            the current branch doesn't match the
            <replaceable>DEBIAN-BRANCH</replaceable>.
          </para>
        </listitem>
      </varlistentry>
    </variablelist>
  </refsect1>
  <refsect1>
    <title>EXAMPLES</title>
    <para>
      Create a tag with the current defaults
    </para>
    <screen>
      &gbp-tag;
    </screen>
    <para>
      Create using a more upstreamish tag format:
    </para>
    <screen>
      &gbp-tag; --debian-tag='v%(version)s'
    </screen>
  </refsect1>
  <refsect1>
    &man.gbp.config-files;
  </refsect1>
  <refsect1>
    <title>SEE ALSO</title>
    <para>
      <xref linkend="man.gbp.buildpackage"/>,
      <xref linkend="man.gbp.push"/>,
      <xref linkend="man.gbp.conf"/>,
    </para>
  </refsect1>
  <refsect1>
    <title>AUTHOR</title>
    <para>
      &dhusername; &dhemail;
    </para>
  </refsect1>
</refentry>