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:
parent
67e6950582
commit
ae148ca0c0
1 changed files with 5 additions and 4 deletions
|
@ -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)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue