Re-add build --release, just to inform users of the new command.

This commit is contained in:
Devan Goodwin 2011-06-28 13:32:05 -03:00
parent e4bd16eba1
commit 33d6dc45bb
2 changed files with 9 additions and 20 deletions

View file

@ -54,15 +54,9 @@ class Builder(object):
self.offline = options.offline self.offline = options.offline
self.auto_install = options.auto_install self.auto_install = options.auto_install
self.rpmbuild_options = options.rpmbuild_options self.rpmbuild_options = options.rpmbuild_options
# 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
else: else:
self.dist = self.test = self.offline = self.auto_install = \ self.dist = self.test = self.offline = self.auto_install = \
self.rpmbuild_options = self.only_tags = None self.rpmbuild_options = None
self.dist = None self.dist = None
self.test = False self.test = False
self.offline = False self.offline = False

View file

@ -325,14 +325,13 @@ class BuildModule(BaseCliModule):
help="build a specific tag instead of the latest version " + help="build a specific tag instead of the latest version " +
"(i.e. spacewalk-java-0.4.0-1)") "(i.e. spacewalk-java-0.4.0-1)")
self.parser.add_option("--release", dest="release",
action="store_true", help="DEPRECATED: please use 'tito release' instead.")
self.parser.add_option("--list-tags", dest="list_tags", self.parser.add_option("--list-tags", dest="list_tags",
action="store_true", action="store_true",
help="List tags for which we build this package", help="List tags for which we build this package",
) )
self.parser.add_option("--only-tags", dest="only_tags",
action="append", metavar="KOJITAG",
help="Build in koji only for specified tags",
)
self.parser.add_option("--upload-new-source", dest="cvs_new_sources", self.parser.add_option("--upload-new-source", dest="cvs_new_sources",
action="append", action="append",
help=("Upload a new source tarball to CVS lookaside. " help=("Upload a new source tarball to CVS lookaside. "
@ -351,6 +350,10 @@ class BuildModule(BaseCliModule):
build_tag = None build_tag = None
build_version = None build_version = None
if self.options.release:
error_out("'tito build --release' is now deprecated. Please see 'tito release'.")
# Determine which package version we should build: # Determine which package version we should build:
if self.options.tag: if self.options.tag:
build_tag = self.options.tag build_tag = self.options.tag
@ -410,19 +413,11 @@ class ReleaseModule(BaseCliModule):
# action="store_true", # action="store_true",
# help="List tags for which we build this package", # help="List tags for which we build this package",
# ) # )
# These are specific only to Koji releaser, what can we do?
# self.parser.add_option("--only-tags", dest="only_tags", # self.parser.add_option("--only-tags", dest="only_tags",
# action="append", metavar="KOJITAG", # action="append", metavar="KOJITAG",
# help="Build in koji only for specified tags", # help="Build in koji only for specified tags",
# ) # )
# self.parser.add_option("--upload-new-source", dest="cvs_new_sources",
# action="append",
# help=("Upload a new source tarball to CVS lookaside. "
# "(i.e. runs 'make new-sources') Must be "
# "used until 'sources' file is committed to CVS."))
# 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", # self.parser.add_option("--scratch", dest="scratch",
# action="store_true", # action="store_true",
# help="Do scratch build (only for --koji-release)", # help="Do scratch build (only for --koji-release)",