'--bpo[Increment the release number for a backports upload]' \
'--nmu[Increment the release number for a NMU upload]' \
'--qa[Increment the release number for a QA upload]' \
+ '(--local -l)'{-l,--local}'=-[Increment the release number for a local build]' \
'--distribution=-[Set the distribution field]' \
'--force-distribution[Force distribution]' \
'--urgency=-[Set the upload urgency]' \
<arg><option>--qa</option></arg>
<arg><option>--security</option></arg>
<arg><option>--team</option></arg>
+ <arg><option>--local=</option><replaceable>suffix</replaceable></arg>
</group>
<arg><option>--distribution=</option><replaceable>name</replaceable></arg>
<arg><option>--force-distribution</option></arg>
</para>
</listitem>
</varlistentry>
+ <varlistentry>
+ <term><option>--local=</option><replaceable>suffix</replaceable>,
+ <option>-l</option> <replaceable>suffix</replaceable>
+ </term>
+ <listitem>
+ <para>
+ Increment the Debian release number for a local build
+ using the specified suffix.
+ This option can't be set via &gbp.conf;.
+ </para>
+ </listitem>
+ </varlistentry>
<varlistentry>
<term><option>--distribution=</option><replaceable>name</replaceable>
</term>
version_group.add_option("--security", dest="security", action="store_true", default=False,
help="Increment the Debian release number for a security upload and "
"add a security upload changelog comment.")
+ version_group.add_option("-l", "--local", dest="local_suffix", metavar="SUFFIX",
+ help="Add a suffix to the Debian version number for a local build.")
version_group.add_boolean_config_file_option(option_name="git-author", dest="use_git_author")
commit_group.add_boolean_config_file_option(option_name="meta", dest="meta")
commit_group.add_config_file_option(option_name="meta-closes", dest="meta_closes")
add_section = False
# add a new changelog section if:
if (options.new_version or options.bpo or options.nmu or options.qa or
- options.team or options.security):
+ options.team or options.security or options.local_suffix):
if options.bpo:
version_change['increment'] = '--bpo'
elif options.nmu:
version_change['increment'] = '--team'
elif options.security:
version_change['increment'] = '--security'
+ elif options.local_suffix:
+ version_change['increment'] = '--local=%s' % options.local_suffix
else:
version_change['version'] = options.new_version
# the user wants to force a new version
self.assertEqual("test-package (%s) %s; urgency=%s\n" % (new_version_0_9, os_codename, default_urgency), lines[0])
self.assertIn(""" * added debian/control\n""", lines)
+ def test_dch_main_increment_debian_version_with_local(self):
+ """Test dch.py like gbp dch script does: increment debian version - local suffix"""
+ options = ["--local", "suffix"]
+ lines = self.run_dch(options)
+ self.assertEqual("test-package (0.9-1suffix1) UNRELEASED; urgency=%s\n" % (default_urgency,), lines[0])
+ self.assertIn(""" * added debian/control\n""", lines)
+
def test_dch_main_increment_debian_version_with_auto(self):
"""Test dch.py like gbp dch script does: increment debian version - guess last commit"""
self.repo.delete_tag("upstream/1.0")