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)