From d21989dba4efea3b45c6e09c0de21b26860b0e0f Mon Sep 17 00:00:00 2001 From: Dalton Date: Tue, 6 Oct 2020 11:20:08 -0500 Subject: [PATCH] AUTH-3148 fixed cloudflared copy and match all the files in the checksum upload --- github_message.py | 7 ++++--- github_release.py | 6 +++--- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/github_message.py b/github_message.py index da7985de..fa69a5b3 100644 --- a/github_message.py +++ b/github_message.py @@ -97,10 +97,11 @@ def main(): msg = release.body - for filename in glob.glob("artifacts/*.*"): - pkg_hash = get_sha256(filename) + for filepath in glob.glob("artifacts/*"): + pkg_hash = get_sha256(filepath) # add the sha256 of the new artifact to the release message body - msg = update_or_add_message(msg, filename, pkg_hash) + name = os.path.basename(filepath) + msg = update_or_add_message(msg, name, pkg_hash) if args.dry_run: logging.info("Skipping asset upload because of dry-run") diff --git a/github_release.py b/github_release.py index 72c8ff14..e2116a77 100755 --- a/github_release.py +++ b/github_release.py @@ -200,10 +200,10 @@ def main(): # copy the binary to the path copy_path = os.path.join(artifact_path, args.name) - if args.path != copy_path: + try: shutil.copy(args.path, copy_path) - - + except shutil.SameFileError: + pass # the macOS release copy fails with being the same file (already in the artifacts directory). Catching to ignore. except Exception as e: logging.exception(e)