From ae148ca0c0cf88c2a56413a706258f01053ce82b Mon Sep 17 00:00:00 2001 From: Michael Hollister Date: Mon, 21 Oct 2024 15:04:14 -0500 Subject: [PATCH] More pathing logic fixes --- receivers/electron/scripts/deploy.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/receivers/electron/scripts/deploy.py b/receivers/electron/scripts/deploy.py index a9dcf60..41ce8f9 100644 --- a/receivers/electron/scripts/deploy.py +++ b/receivers/electron/scripts/deploy.py @@ -103,13 +103,14 @@ def upload_local_cache(current_version): local_files = [] for root, _, files in os.walk(LOCAL_CACHE_DIR): for filename in files: - rel_path = os.path.relpath(os.path.join(root, filename), LOCAL_CACHE_DIR) + full_path = os.path.join(root, filename) + rel_path = os.path.relpath(full_path, LOCAL_CACHE_DIR) version = rel_path.split('/')[1] if RELEASE_CANDIDATE and version == current_version: - rc_path = rel_path[:rel_path.rfind('.')] + f'_rc{RELEASE_CANDIDATE_VERSION}' + rel_path[rel_path.rfind('.'):] - os.rename(os.path.join(root, rel_path), os.path.join(root, rc_path)) - rel_path = rc_path + rc_path = full_path[:full_path.rfind('.')] + f'_rc{RELEASE_CANDIDATE_VERSION}' + full_path[full_path.rfind('.'):] + os.rename(full_path, rc_path) + rel_path = os.path.relpath(rc_path, LOCAL_CACHE_DIR) local_files.append(rel_path)