mirror of
https://github.com/rpm-software-management/tito.git
synced 2025-02-23 20:22:46 +00:00
implement --list-tags option for builder
this should get plain list. One tag per each line. Eg.: dist-5E-sw-1.3-candidate dist-f13-sw-1.3-candidate if run --list-tags --debug, it should list all tags with explanation why it is included or not listed. E.g: dist-5E-sw-1.3-candidate dist-f13-sw-1.3-candidate whitelisted dist-f14-sw-1.3-candidate blacklisted
This commit is contained in:
parent
6d5e38793a
commit
7834bf46d8
3 changed files with 30 additions and 0 deletions
|
@ -179,6 +179,8 @@ class Builder(object):
|
|||
self._cvs_release()
|
||||
elif options.koji_release:
|
||||
self._koji_release()
|
||||
elif options.list_tags:
|
||||
self._list_tags()
|
||||
|
||||
self.cleanup()
|
||||
return self.artifacts
|
||||
|
@ -358,6 +360,25 @@ class Builder(object):
|
|||
|
||||
self._submit_build("koji", koji_opts, koji_tag)
|
||||
|
||||
def _list_tags(self):
|
||||
""" Print tags to which we build this package. """
|
||||
autobuild_tags = self.config.get("koji", "autobuild_tags")
|
||||
koji_tags = autobuild_tags.strip().split(" ")
|
||||
for koji_tag in koji_tags:
|
||||
if self.config.has_option(koji_tag, "whitelist") and \
|
||||
self.project_name in self.config.get(koji_tag,
|
||||
"whitelist").strip().split(" "):
|
||||
if 'DEBUG' in os.environ:
|
||||
koji_tag += ' whitelisted'
|
||||
elif self.config.has_option(koji_tag, "blacklist") and \
|
||||
self.project_name in self.config.get(koji_tag,
|
||||
"blacklist").strip().split(" "):
|
||||
if 'DEBUG' in os.environ:
|
||||
koji_tag += ' blacklisted'
|
||||
else:
|
||||
continue
|
||||
print koji_tag
|
||||
|
||||
def _setup_sources(self):
|
||||
"""
|
||||
Create a copy of the git source for the project at the point in time
|
||||
|
|
|
@ -345,6 +345,10 @@ class BuildModule(BaseCliModule):
|
|||
action="store_true",
|
||||
help="Release package only in Koji. (if possible)",
|
||||
)
|
||||
self.parser.add_option("--list-tags", dest="list_tags",
|
||||
action="store_true",
|
||||
help="List tags for which we build this package",
|
||||
)
|
||||
self.parser.add_option("--upload-new-source", dest="cvs_new_sources",
|
||||
action="append",
|
||||
help=("Upload a new source tarball to CVS lookaside. "
|
||||
|
|
|
@ -157,6 +157,11 @@ Release package only in CVS. (if possible)
|
|||
--koji-release::
|
||||
Release package only in Koji. (if possible)
|
||||
|
||||
--list-tags::
|
||||
List tags for which we build this package. If you set --debug together
|
||||
with this option, you will see all tags and whether they are whitelisted
|
||||
or blacklisted.
|
||||
|
||||
--upload-new-source='CVS_NEW_SOURCES'::
|
||||
Upload a new source tarball to CVS lookaside. (i.e.
|
||||
runs 'make new-sources') Must be used until 'sources'
|
||||
|
|
Loading…
Add table
Reference in a new issue