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

rename to rc only for current versions

This commit is contained in:
Michael Hollister 2024-10-21 14:51:03 -05:00
parent 1ff9a84da7
commit 1e1ef7cb8a

View file

@ -96,7 +96,7 @@ def sync_local_cache():
with open(save_path, 'wb') as file:
file.write(get_response['Body'].read())
def upload_local_cache():
def upload_local_cache(current_version):
print('Uploading local cache to s3...')
shutil.copytree(TEMP_DIR, os.path.join(LOCAL_CACHE_DIR, 'electron'), dirs_exist_ok=True)
@ -104,8 +104,9 @@ def upload_local_cache():
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)
version = rel_path.split('/')[1]
if RELEASE_CANDIDATE:
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(rel_path, rc_path)
rel_path = rc_path
@ -137,7 +138,7 @@ def update_website():
current_version = copy_artifacts_to_local_cache()
sync_local_cache()
# generate_delta_updates(current_version)
upload_local_cache()
upload_local_cache(current_version)
# generate_previous_releases_page()
# update_website()