diff --git a/eng/pipelines/mono/update-machine-certs.ps1 b/eng/pipelines/mono/update-machine-certs.ps1 index 1a6be78b199470..508f7dde205f6f 100644 --- a/eng/pipelines/mono/update-machine-certs.ps1 +++ b/eng/pipelines/mono/update-machine-certs.ps1 @@ -1,16 +1,19 @@ # This seems to update the machine cert store so that python can download the files as required by emscripten's install +# Based on info at https://pypi.org/project/certifi/ +pip install certifi + $WebsiteURL="storage.googleapis.com" Try { - $Conn = New-Object System.Net.Sockets.TcpClient($WebsiteURL,443) - + $Conn = New-Object System.Net.Sockets.TcpClient($WebsiteURL,443) + Try { $Stream = New-Object System.Net.Security.SslStream($Conn.GetStream()) - $Stream.AuthenticateAsClient($WebsiteURL) - + $Stream.AuthenticateAsClient($WebsiteURL) + $Cert = $Stream.Get_RemoteCertificate() - + $ValidTo = [datetime]::Parse($Cert.GetExpirationDatestring()) - + Write-Host "`nConnection Successfull" -ForegroundColor DarkGreen Write-Host "Website: $WebsiteURL" } diff --git a/src/mono/mono.proj b/src/mono/mono.proj index 48d7a215026f38..e818aa5f5f1fe8 100644 --- a/src/mono/mono.proj +++ b/src/mono/mono.proj @@ -136,18 +136,23 @@ .sh - .bat + .ps1 $(ProvisionEmscriptenDir) $([MSBuild]::NormalizeDirectory('$(MSBuildThisFileDirectory)', 'wasm')) emsdk %(_VersionLines.Identity) + + ./emsdk$(EmsdkExt) install $(EmscriptenVersion) + ./emsdk$(EmsdkExt) activate $(EmscriptenVersion) + powershell -NonInteractive -command "& $(InstallCmd); Exit $LastExitCode " + powershell -NonInteractive -command "& $(ActivateCmd); Exit $LastExitCode " -