mirror of
https://gitlab.com/futo-org/fcast.git
synced 2025-07-19 22:46:59 +00:00
rename to rc only for current versions
This commit is contained in:
parent
1ff9a84da7
commit
1e1ef7cb8a
1 changed files with 4 additions and 3 deletions
|
@ -96,7 +96,7 @@ def sync_local_cache():
|
||||||
with open(save_path, 'wb') as file:
|
with open(save_path, 'wb') as file:
|
||||||
file.write(get_response['Body'].read())
|
file.write(get_response['Body'].read())
|
||||||
|
|
||||||
def upload_local_cache():
|
def upload_local_cache(current_version):
|
||||||
print('Uploading local cache to s3...')
|
print('Uploading local cache to s3...')
|
||||||
shutil.copytree(TEMP_DIR, os.path.join(LOCAL_CACHE_DIR, 'electron'), dirs_exist_ok=True)
|
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 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)
|
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('.'):]
|
rc_path = rel_path[:rel_path.rfind('.')] + f'_rc{RELEASE_CANDIDATE_VERSION}' + rel_path[rel_path.rfind('.'):]
|
||||||
os.rename(rel_path, rc_path)
|
os.rename(rel_path, rc_path)
|
||||||
rel_path = rc_path
|
rel_path = rc_path
|
||||||
|
@ -137,7 +138,7 @@ def update_website():
|
||||||
current_version = copy_artifacts_to_local_cache()
|
current_version = copy_artifacts_to_local_cache()
|
||||||
sync_local_cache()
|
sync_local_cache()
|
||||||
# generate_delta_updates(current_version)
|
# generate_delta_updates(current_version)
|
||||||
upload_local_cache()
|
upload_local_cache(current_version)
|
||||||
# generate_previous_releases_page()
|
# generate_previous_releases_page()
|
||||||
# update_website()
|
# update_website()
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue