File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -129,7 +129,7 @@ def get_defaults() -> dict[str, Any]:
129129 return {
130130 "dependencies.golang.resolution" : "SDK" ,
131131 "dependencies.golang.tag" : "go1.23.10" ,
132- "dependencies.golang.urlTemplate.linux" : "https://golang.org/dl/{TAG}.linux-amd64 .tar.gz" ,
132+ "dependencies.golang.urlTemplate.linux" : "https://golang.org/dl/{TAG}.linux-{ARCH} .tar.gz" ,
133133 "dependencies.golang.urlTemplate.osx" : "https://golang.org/dl/{TAG}.darwin-amd64.tar.gz" ,
134134 "dependencies.golang.urlTemplate.windows" : "https://golang.org/dl/{TAG}.windows-amd64.zip" ,
135135 "dependencies.testwallets.tag" : "v1.0.0" ,
Original file line number Diff line number Diff line change 11import logging
2+ import platform
23import os
34import shutil
45from os import path
@@ -122,13 +123,22 @@ def get_parent_directory(self) -> Path:
122123 return config .get_dependency_parent_directory (self .key )
123124
124125 def _get_download_url (self , tag : str ) -> str :
125- platform = workstation .get_platform ()
126+ plat = workstation .get_platform ()
126127
127- url = config .get_dependency_url (self .key , tag , platform )
128+ url = config .get_dependency_url (self .key , tag , plat )
128129 if not url :
129- raise errors .PlatformNotSupported (self .key , platform )
130-
131- url = url .replace ("{TAG}" , tag )
130+ raise errors .PlatformNotSupported (self .key , plat )
131+
132+ machine = platform .machine ().lower ()
133+ arch_map = {
134+ "x86_64" : "amd64" ,
135+ "amd64" : "amd64" ,
136+ "aarch64" : "arm64" ,
137+ "arm64" : "arm64" ,
138+ }
139+ arch = arch_map .get (machine , "amd64" )
140+
141+ url = url .replace ("{TAG}" , tag ).replace ("{ARCH}" , arch )
132142 return url
133143
134144 def _get_archive_path (self , tag : str ) -> Path :
You can’t perform that action at this time.
0 commit comments