@@ -28,27 +28,24 @@ jobs:
2828 displayName : Download x86 msix
2929 patterns : ' **/*.msix'
3030
31- - pwsh : |
32- $cmd = Get-Command makeappx.exe -ErrorAction Ignore
33- if ($cmd) {
34- Write-Verbose -Verbose 'makeappx available in PATH'
35- $exePath = $cmd.Source
36- } else {
37- $toolsDir = '$(Pipeline.Workspace)\releasePipeline\tools'
38- New-Item $toolsDir -Type Directory -Force > $null
39- Invoke-RestMethod -Uri '$(makeappUrl)' -OutFile "$toolsDir\makeappx.zip"
40- Expand-Archive "$toolsDir\makeappx.zip" -DestinationPath "$toolsDir\makeappx" -Force
41- $exePath = "$toolsDir\makeappx\makeappx.exe"
42-
43- Write-Verbose -Verbose 'makeappx was installed:'
44- Get-ChildItem -Path $toolsDir -Recurse
45- }
46-
47- $vstsCommandString = "vso[task.setvariable variable=MakeAppxPath]$exePath"
48- Write-Host "sending " + $vstsCommandString
49- Write-Host "##$vstsCommandString"
31+ - task : AzurePowerShell@5
5032 displayName : Install makeappx tool
5133 retryCountOnTaskFailure : 1
34+ inputs :
35+ azureSubscription : az-blob-cicd-infra
36+ scriptType : inlineScript
37+ azurePowerShellVersion : LatestVersion
38+ pwsh : true
39+ inline : |
40+ $toolsDir = '$(Pipeline.Workspace)\releasePipeline\tools'
41+ New-Item $toolsDir -Type Directory -Force > $null
42+ Invoke-RestMethod -Uri '$(makeappUrlDirect)' -OutFile "$toolsDir\makeappx.zip"
43+ Expand-Archive "$toolsDir\makeappx.zip" -DestinationPath "$toolsDir\makeappx" -Force
44+ $exePath = "$toolsDir\makeappx\makeappx.exe"
45+
46+ $vstsCommandString = "vso[task.setvariable variable=MakeAppxPath]$exePath"
47+ Write-Host "sending " + $vstsCommandString
48+ Write-Host "##$vstsCommandString"
5249
5350 - pwsh : |
5451 $sourceDir = '$(Pipeline.Workspace)\releasePipeline\msix'
0 commit comments