mirror of
https://github.com/rpm-software-management/tito.git
synced 2025-02-23 20:22:46 +00:00
Respect --dry-run when releasing to yum.
This commit is contained in:
parent
d94aacae64
commit
72ff053cad
1 changed files with 9 additions and 3 deletions
|
@ -255,6 +255,8 @@ class YumRepoReleaser(Releaser):
|
||||||
builder_class=self.releaser_config.get(self.target, 'builder'))
|
builder_class=self.releaser_config.get(self.target, 'builder'))
|
||||||
|
|
||||||
def release(self, dry_run=False):
|
def release(self, dry_run=False):
|
||||||
|
self.dry_run = dry_run
|
||||||
|
|
||||||
# Should this run?
|
# Should this run?
|
||||||
self.builder.tgz()
|
self.builder.tgz()
|
||||||
self.builder.srpm()
|
self.builder.srpm()
|
||||||
|
@ -286,9 +288,13 @@ class YumRepoReleaser(Releaser):
|
||||||
|
|
||||||
print("Syncing yum repository back to: %s" % rsync_location)
|
print("Syncing yum repository back to: %s" % rsync_location)
|
||||||
# TODO: configurable rsync options?
|
# TODO: configurable rsync options?
|
||||||
output = run_command("rsync -avtz --delete %s/ %s" %
|
cmd = "rsync -avtz --delete %s/ %s" % \
|
||||||
(yum_temp_dir, rsync_location))
|
(yum_temp_dir, rsync_location)
|
||||||
debug(output)
|
if self.dry_run:
|
||||||
|
self.print_dry_run_warning(cmd)
|
||||||
|
else:
|
||||||
|
output = run_command(cmd)
|
||||||
|
debug(output)
|
||||||
|
|
||||||
# TODO: Cleanup
|
# TODO: Cleanup
|
||||||
#rmtree(yum_temp_dir)
|
#rmtree(yum_temp_dir)
|
||||||
|
|
Loading…
Add table
Reference in a new issue