From 8103680cf7a97269b3692484e9a5bb3c1cc08eb3 Mon Sep 17 00:00:00 2001 From: Simon McVittie <smcv@collabora.com> Date: Thu, 1 Jul 2021 18:23:30 +0100 Subject: [PATCH] CI: Don't do final upload commands with --dry-run Signed-off-by: Simon McVittie <smcv@collabora.com> --- pressure-vessel/upload-artifacts.py | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/pressure-vessel/upload-artifacts.py b/pressure-vessel/upload-artifacts.py index 20d49e7a4..259aa2fbe 100755 --- a/pressure-vessel/upload-artifacts.py +++ b/pressure-vessel/upload-artifacts.py @@ -352,17 +352,18 @@ class Uploader: logger.info('%r', argv) subprocess.check_call(argv) - # Check that our rsync options didn't optimize away a change that - # should have happened - with open(str(upload / 'SHA256SUMS')) as reader: - self.check_call([ - 'env', '--chdir', '{}'.format(version), - 'sha256sum', '--strict', '--quiet', '-c', - ], stdin=reader) + if not self.dry_run: + # Check that our rsync options didn't optimize away a change that + # should have happened + with open(str(upload / 'SHA256SUMS')) as reader: + self.check_call([ + 'env', '--chdir', '{}'.format(version), + 'sha256sum', '--strict', '--quiet', '-c', + ], stdin=reader) - self.check_call([ - 'ln', '-fns', version, 'latest', - ]) + self.check_call([ + 'ln', '-fns', version, 'latest', + ]) def main() -> None: -- GitLab