first run at adding --no-build; this will allow

scripted DistGit commits and koji/brew chain-builds

Needs testing.

pep8 cleanup from my changes

switch --no_build to --no-build for consistency

scope matters ... should pay attention to that
This commit is contained in:
Adam Miller 2012-11-20 17:13:34 -06:00
parent 7d7b419a2e
commit 03529cbab7
3 changed files with 16 additions and 4 deletions

View file

@ -464,6 +464,10 @@ class ReleaseModule(BaseCliModule):
action="store_true",
help="List all configured release targets.")
self.parser.add_option("--no-build", dest="no_build",
action="store_true", default=False,
help="Do not perform a build after a DistGit commit")
# self.parser.add_option("--list-tags", dest="list_tags",
# action="store_true",
# help="List tags for which we build this package",
@ -615,7 +619,8 @@ class ReleaseModule(BaseCliModule):
target=target,
releaser_config=releaser_config,
no_cleanup=self.options.no_cleanup)
releaser.release(dry_run=self.options.dry_run)
releaser.release(dry_run=self.options.dry_run,
no_build=self.options.no_build)
releaser.cleanup()
# Make sure we go back to where we started, otherwise multiple

View file

@ -455,8 +455,9 @@ class FedoraGitReleaser(Releaser):
self.git_branches)
self.build_targets = build_target_parser.get_build_targets()
def release(self, dry_run=False):
def release(self, dry_run=False, no_build=False):
self.dry_run = dry_run
self.no_build = no_build
self._git_release()
def _get_build_target_for_branch(self, branch):
@ -570,7 +571,8 @@ class FedoraGitReleaser(Releaser):
print(cmd)
run_command(cmd)
self._build(main_branch)
if not self.no_build:
self._build(main_branch)
for branch in self.git_branches[1:]:
print("Merging branch: '%s' -> '%s'" % (main_branch, branch))
@ -584,7 +586,9 @@ class FedoraGitReleaser(Releaser):
print(cmd)
run_command(cmd)
self._build(branch)
if not no_build:
self._build(branch)
print
def _merge(self, main_branch):

View file

@ -191,6 +191,9 @@ build a specific tag instead of the latest version
--dry-run::
Do not actually commit/push anything during release.
--no-build::
Do not perform a brew/koji build, only DistGit (only for Koji/DistGit releasers)
--all::
Run all release targets defined in rel-eng/releasers.conf.