From 266299a931c9370ab925833ff669aca0479e8638 Mon Sep 17 00:00:00 2001 From: Mikhail Shchatko Date: Tue, 22 Oct 2024 11:01:47 +0300 Subject: [PATCH] SERVER-96012 Retry codesign dev binaries for testing on macos (#28293) GitOrigin-RevId: 00afb717506f28ff9190241e7db96d0dfb7be347 --- .../sign_macos_binaries_for_testing.py | 27 ++++++++++--------- 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/buildscripts/sign_macos_binaries_for_testing.py b/buildscripts/sign_macos_binaries_for_testing.py index abf83029fa4..e6a8ecb1ffd 100644 --- a/buildscripts/sign_macos_binaries_for_testing.py +++ b/buildscripts/sign_macos_binaries_for_testing.py @@ -37,19 +37,22 @@ def main(): if not os.path.isfile(binary_path): continue + cmd = [ + "/usr/bin/codesign", + "-s", + "-", + "-f", + "--entitlements", + entitlements_file, + binary_path, + ] + print(f"Signing {binary}") - subprocess.run( - [ - "/usr/bin/codesign", - "-s", - "-", - "-f", - "--entitlements", - entitlements_file, - binary_path, - ], - check=True, - ) + try: + subprocess.run(cmd, check=True) + except subprocess.CalledProcessError: + print(f"Signing {binary} retry") + subprocess.run(cmd, check=True) if __name__ == "__main__":