1
0

Enhance update_mod_versions.py with detailed print statements for checking release tags and assets during processing

This commit is contained in:
Gabriel Freitas
2025-07-07 11:18:51 -03:00
parent 7c43f8b82e
commit fa76b2a899

View File

@@ -197,16 +197,21 @@ def process_mod(start_timestamp, name, meta_file):
source = VersionSource.HEAD
new_version = get_version_string(VersionSource.HEAD, owner, repo, start_timestamp)
elif (meta.get('fixed-release-tag-updates') == True):
print("Download URL links to specific tag, checking that tag...")
source = VersionSource.SPECIFIC_TAG
tag_data = {}
if "/releases/download/" in download_url:
# Pattern: /releases/download/{tag}/{file} - tag is second-to-last
tag_data['name'] = download_url.split('/')[-2]
print("Download URL links to specific release asset, checking that asset's tag...")
tag_name = download_url.split('/')[-2]
print(f"Checking release tag: {tag_name}")
tag_data['name'] = tag_name
else:
# Pattern: /releases/tag/{tag} - tag is last
tag_data['name'] = download_url.split('/')[-1]
print("Download URL links to specific release tag, checking that tag...")
tag_name = download_url.split('/')[-1]
print(f"Checking release tag: {tag_name}")
tag_data['name'] = tag_name
new_version = get_version_string(
source, owner, repo, start_timestamp, tag_data=tag_data