def _get_download_url(self, tag: str) -> str: platform = workstation.get_platform() url = config.get_dependency_url(self.key, tag, platform) if url is None: raise errors.PlatformNotSupported(self.key, platform) url = url.replace("{TAG}", tag) return url
def _get_download_url(self): platform = workstation.get_platform() url = self.urls_by_platform.get(platform) if url is None: raise errors.PlatformNotSupported(self.name, platform) url = f"{config.DOWNLOAD_MIRROR}/{url}" return url
def build_binaries(testnet_config: TestnetConfiguration): golang = dependencies.get_module_by_key("golang") golang_env = golang.get_env() myprocess.run_process(['go', 'env'], env=golang_env) logger.info("Building seednode...") seednode_folder = testnet_config.node_source() / "cmd" / "seednode" myprocess.run_process(['go', 'build'], cwd=seednode_folder, env=golang_env) logger.info("Building node...") node_folder = testnet_config.node_source() / "cmd" / "node" myprocess.run_process(['go', 'build'], cwd=node_folder, env=golang_env) logger.info("Building arwen...") node_folder_root = testnet_config.node_source() env = dict(golang_env) env["ARWEN_PATH"] = node_folder myprocess.run_process(['make', 'arwen'], cwd=node_folder_root, env=env) logger.info("Building proxy...") proxy_folder = testnet_config.proxy_source() / "cmd" / "proxy" myprocess.run_process(['go', 'build'], cwd=proxy_folder, env=golang_env) # Now copy the binaries to the testnet folder arwen_version = _get_arwen_version(testnet_config) libwasmer_path = path.join( golang.get_gopath(), f"pkg/mod/github.com/!elrond!network/arwen-wasm-vm@{arwen_version}/wasmer/libwasmer_darwin_amd64.dylib" ) shutil.copy(seednode_folder / "seednode", testnet_config.seednode_folder()) if workstation.get_platform() == "osx": shutil.copy(libwasmer_path, testnet_config.seednode_folder()) for destination in testnet_config.all_nodes_folders(): shutil.copy(node_folder / "node", destination) shutil.copy(node_folder / "arwen", destination) if workstation.get_platform() == "osx": shutil.copy(libwasmer_path, destination) shutil.copy(proxy_folder / "proxy", testnet_config.proxy_folder()) if workstation.get_platform() == "osx": shutil.copy(libwasmer_path, testnet_config.proxy_folder())