[Windows] Rename and refactor downloading function (#8906)

This commit is contained in:
Vasilii Polikarpov
2023-11-29 13:02:29 +01:00
committed by GitHub
parent bfe32a2b12
commit 7dba8776df
32 changed files with 105 additions and 130 deletions

View File

@@ -7,13 +7,13 @@ $BuildComponentUri = "https://aka.ms/BuildComponentSetup.EN"
$BuildComponentSignatureThumbprint = "8740DF4ACB749640AD318E4BE842F72EC651AD80"
Write-Host "Downloading BizTalk Project Build Component archive..."
$setupZipFile = Start-DownloadWithRetry -Url $BuildComponentUri -Name "BuildComponentSetup.EN.zip"
$zipFile = Invoke-DownloadWithRetry $BuildComponentUri
$setupPath = Join-Path $env:TEMP "BizTalkBuildComponent"
if (-not (Test-Path -Path $setupPath)) {
$null = New-Item -Path $setupPath -ItemType Directory -Force
}
Expand-7ZipArchive -Path $setupZipFile -DestinationPath $setupPath
Expand-7ZipArchive -Path $zipFile -DestinationPath $setupPath
Write-Host "Installing BizTalk Project Build Component..."
Install-Binary `
@@ -25,7 +25,4 @@ Install-Binary `
-ExtraInstallArgs ("/l*v", "$setupPath\buildComponentSetup.log") `
-ExpectedSignature $BuildComponentSignatureThumbprint
Remove-Item $setupZipFile
Remove-Item $setupPath -Recurse -Force
Invoke-PesterTests -TestFile "BizTalk" -TestName "BizTalk Build Component Setup"