@@ -50,28 +50,14 @@ def __post_init__(self):
5050
5151def _construct_package_download_url (
5252 packages_ctx : PackagesContext ,
53- target_version : str ,
5453 package_remote_config : PackageRemoteConfig ,
5554) -> str :
5655 """Construct the download URL for the given package name and version."""
5756
58- # -- Convert the version to "YYYY-MM-DD"
59- # -- Move to a function in util.py.
60- version_tokens = target_version .split ("." )
61- assert len (version_tokens ) == 3 , version_tokens
62- yyyy_mm_dd = (
63- f"{ int (version_tokens [0 ]):04d} "
64- + "-"
65- + f"{ int (version_tokens [1 ]):02d} "
66- + "-"
67- + f"{ int (version_tokens [2 ]):02d} "
68- )
69-
7057 # -- Create vars mapping.
7158 url_vars = {
7259 "${PLATFORM}" : packages_ctx .platform_id ,
73- "${YYYY-MM-DD}" : yyyy_mm_dd ,
74- "${YYYYMMDD}" : yyyy_mm_dd .replace ("-" , "" ),
60+ "${YYYYMMDD}" : package_remote_config .release_tag .replace ("-" , "" ),
7561 }
7662 if util .is_debug (1 ):
7763 cout (f"Package URL vars: { url_vars } " )
@@ -91,7 +77,7 @@ def _construct_package_download_url(
9177 if util .is_debug (1 ):
9278 cout (f"package url parts = { url_parts } " )
9379
94- # -- Concatanate the URL parts.
80+ # -- Concatenate the URL parts.
9581 url = "" .join (url_parts )
9682
9783 if util .is_debug (1 ):
@@ -338,7 +324,7 @@ def install_package(
338324
339325 # -- Construct the download URL.
340326 download_url = _construct_package_download_url (
341- packages_ctx , target_version , package_config
327+ packages_ctx , package_config
342328 )
343329 if verbose :
344330 cout (f"Download URL: { download_url } " )
0 commit comments