1
0
Fork 0
mirror of https://gitlab.com/futo-org/fcast.git synced 2025-06-24 21:25:23 +00:00

More pathing logic fixes

This commit is contained in:
Michael Hollister 2024-10-21 15:04:14 -05:00
parent 67e6950582
commit ae148ca0c0

View file

@ -103,13 +103,14 @@ def upload_local_cache(current_version):
local_files = [] local_files = []
for root, _, files in os.walk(LOCAL_CACHE_DIR): for root, _, files in os.walk(LOCAL_CACHE_DIR):
for filename in files: 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] version = rel_path.split('/')[1]
if RELEASE_CANDIDATE and version == current_version: if RELEASE_CANDIDATE and version == current_version:
rc_path = rel_path[:rel_path.rfind('.')] + f'_rc{RELEASE_CANDIDATE_VERSION}' + rel_path[rel_path.rfind('.'):] rc_path = full_path[:full_path.rfind('.')] + f'_rc{RELEASE_CANDIDATE_VERSION}' + full_path[full_path.rfind('.'):]
os.rename(os.path.join(root, rel_path), os.path.join(root, rc_path)) os.rename(full_path, rc_path)
rel_path = rc_path rel_path = os.path.relpath(rc_path, LOCAL_CACHE_DIR)
local_files.append(rel_path) local_files.append(rel_path)