Remove the old tito build --release code.

Use "tito release" now.
This commit is contained in:
Devan Goodwin 2011-06-02 14:44:22 -03:00
parent 737f4e4fbe
commit aae0b304de
2 changed files with 1 additions and 80 deletions

View file

@ -54,17 +54,15 @@ class Builder(object):
self.offline = options.offline
self.auto_install = options.auto_install
self.rpmbuild_options = options.rpmbuild_options
self.dry_run = options.dry_run
# These two options are specific to the Koji releaser. If we end up
# refactoring to a separate "release" command, these can probably
# go away.
self.only_tags = options.only_tags
self.scratch = options.scratch
else:
self.dist = self.test = self.offline = self.auto_install = \
self.rpmbuild_options = self.only_tags = self.scratch = None
self.rpmbuild_options = self.only_tags = None
self.dist = None
self.test = False
self.offline = False
@ -159,21 +157,6 @@ class Builder(object):
if options.rpm:
self._rpm()
if options.release:
self.release()
elif options.cvs_release:
releaser = CvsReleaser(self)
releaser.release(dry_run=self.dry_run)
elif options.koji_release:
releaser = KojiReleaser(self)
releaser.release(dry_run=self.dry_run)
elif options.git_release:
releaser = FedoraGitReleaser(self)
releaser.release(dry_run=self.dry_run)
elif options.list_tags:
koji_releaser = KojiReleaser(self)
koji_releaser.list_tags()
self.cleanup()
return self.artifacts
@ -287,26 +270,6 @@ class Builder(object):
except KeyboardInterrupt:
pass
def release(self):
"""
Release this package via configuration for this git repo and branch.
Check if CVS support is configured in rel-eng/global.build.py.props
and initiate CVS import/tag/build if so.
Check for configured Koji branches also, if found create srpms and
submit to those branches with proper disttag's.
"""
cvs_releaser = CvsReleaser(self)
cvs_releaser.release(self.dry_run)
koji_releaser = KojiReleaser(self)
koji_releaser.release(self.dry_run)
git_releaser = FedoraGitReleaser(self)
git_releaser.release(self.dry_run)
def _setup_sources(self):
"""
Create a copy of the git source for the project at the point in time

View file

@ -325,34 +325,6 @@ class BuildModule(BaseCliModule):
help="build a specific tag instead of the latest version " +
"(i.e. spacewalk-java-0.4.0-1)")
self.parser.add_option("--release", dest="release",
action="store_true", help="%s %s %s" % (
"Release package according to repo configuration.",
"(import into CVS and submit to build system, or create ",
"src.rpm's and submit directly to koji)",
))
self.parser.add_option("--dry-run", dest="dry_run",
action="store_true", default=False,
help="Do not actually commit/push anything during --release.",
)
self.parser.add_option("--cvs-release", dest="cvs_release",
action="store_true",
help="Release package only in CVS. (if possible)",
)
self.parser.add_option("--git-release", dest="git_release",
action="store_true",
help="Release package only in git based build system. "
"(i.e. Fedora)",
)
self.parser.add_option("--koji-release", dest="koji_release",
action="store_true",
help="Release package only in Koji. (if possible)",
)
self.parser.add_option("--yum-release", dest="yum_release",
action="store_true",
help="Build packages in mock and generate a yum repository.",
)
self.parser.add_option("--list-tags", dest="list_tags",
action="store_true",
help="List tags for which we build this package",
@ -370,10 +342,6 @@ class BuildModule(BaseCliModule):
self.parser.add_option("--rpmbuild-options", dest='rpmbuild_options',
default='',
metavar="OPTIONS", help="Options to pass to rpmbuild.")
self.parser.add_option("--scratch", dest="scratch",
action="store_true",
help="Do scratch build (only for --koji-release)",
)
def main(self, argv):
BaseCliModule.main(self, argv)
@ -410,16 +378,6 @@ class BuildModule(BaseCliModule):
error_out("Cannot combine --srpm and --rpm")
if self.options.test and self.options.tag:
error_out("Cannot build test version of specific tag.")
if (self.options.srpm or self.options.rpm) and self.options.release:
error_out("Cannot combine --srpm/--rpm with --release.")
if self.options.release and (self.options.cvs_release or
self.options.koji_release):
error_out([
"Cannot combine --cvs-release/--koji-release with --release.",
"(--release includes both)"])
if self.options.release and self.options.test:
error_out("Cannot combine --release with --test.")
class ReleaseModule(BaseCliModule):