mirror of
https://github.com/rpm-software-management/tito.git
synced 2025-02-24 04:32:46 +00:00
List releasers option.
This commit is contained in:
parent
e023b08c9d
commit
8298b5e304
2 changed files with 18 additions and 6 deletions
|
@ -445,6 +445,9 @@ class ReleaseModule(BaseCliModule):
|
||||||
self.parser.add_option("--all-starting-with", dest="all_starting_with",
|
self.parser.add_option("--all-starting-with", dest="all_starting_with",
|
||||||
help="Run all release targets starting with the given string.")
|
help="Run all release targets starting with the given string.")
|
||||||
|
|
||||||
|
self.parser.add_option("-l", "--list", dest="list_releasers",
|
||||||
|
action="store_true",
|
||||||
|
help="List all configured release targets.")
|
||||||
|
|
||||||
# self.parser.add_option("--list-tags", dest="list_tags",
|
# self.parser.add_option("--list-tags", dest="list_tags",
|
||||||
# action="store_true",
|
# action="store_true",
|
||||||
|
@ -470,12 +473,6 @@ class ReleaseModule(BaseCliModule):
|
||||||
error_out("Cannot use explicit release targets with "
|
error_out("Cannot use explicit release targets with "
|
||||||
"--all or --all-starting-with.")
|
"--all or --all-starting-with.")
|
||||||
|
|
||||||
# First arg is sub-command 'release', the rest should be our release
|
|
||||||
# targets:
|
|
||||||
if len(self.args) < 2 and (self.options.all_starting_with is None) and \
|
|
||||||
(self.options.all is None):
|
|
||||||
error_out("You must supply at least one release target.")
|
|
||||||
|
|
||||||
|
|
||||||
def _read_releaser_config(self):
|
def _read_releaser_config(self):
|
||||||
"""
|
"""
|
||||||
|
@ -547,6 +544,18 @@ class ReleaseModule(BaseCliModule):
|
||||||
BaseCliModule.main(self, argv)
|
BaseCliModule.main(self, argv)
|
||||||
|
|
||||||
releaser_config = self._read_releaser_config()
|
releaser_config = self._read_releaser_config()
|
||||||
|
|
||||||
|
if self.options.list_releasers:
|
||||||
|
self._print_releasers(releaser_config)
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
|
# First arg is sub-command 'release', the rest should be our release
|
||||||
|
# targets:
|
||||||
|
if len(self.args) < 2 and (self.options.all_starting_with is None) and \
|
||||||
|
(self.options.all is None):
|
||||||
|
error_out("You must supply at least one release target.")
|
||||||
|
|
||||||
|
|
||||||
self._legacy_builder_hack(releaser_config)
|
self._legacy_builder_hack(releaser_config)
|
||||||
|
|
||||||
targets = self._calc_release_targets(releaser_config)
|
targets = self._calc_release_targets(releaser_config)
|
||||||
|
|
|
@ -194,6 +194,9 @@ Do not actually commit/push anything during release.
|
||||||
--all::
|
--all::
|
||||||
Run all release targets defined in rel-eng/releasers.conf.
|
Run all release targets defined in rel-eng/releasers.conf.
|
||||||
|
|
||||||
|
--list::
|
||||||
|
List all release targets defined in rel-eng/releasers.conf.
|
||||||
|
|
||||||
--all-starting-with=ALL_STARTING_WITH::
|
--all-starting-with=ALL_STARTING_WITH::
|
||||||
Run all release targets starting with the given string. (i.e.
|
Run all release targets starting with the given string. (i.e.
|
||||||
if you have defined release targets yum-f15 and yum-f14 in releasers.conf,
|
if you have defined release targets yum-f15 and yum-f14 in releasers.conf,
|
||||||
|
|
Loading…
Add table
Reference in a new issue