From 0e72e6adf919b153297b50e319081e79246e5e1c Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Mon, 1 Oct 2018 09:29:28 +0200 Subject: [PATCH] Allow using RSYNC_USERNAME env var --- fwsreleasers/main.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/fwsreleasers/main.py b/fwsreleasers/main.py index 4a2fb64..2e30f4a 100644 --- a/fwsreleasers/main.py +++ b/fwsreleasers/main.py @@ -50,6 +50,10 @@ class RsyncSRPMSReleaser(RsyncReleaser): rsync = self.releaser_config.get(self.target, 'rsync').split(" ") for destination in rsync: + if RSYNC_USERNAME in os.environ: + print("%s set, using rsync username: %s" % (RSYNC_USERNAME, + os.environ[RSYNC_USERNAME])) + destination = "%s@%s" % (os.environ[RSYNC_USERNAME], destination) for artifact in self.builder.artifacts: if artifact.endswith('.src.rpm'): cmd = "rsync %s %s %s" % (self.rsync_args, artifact, destination)