@@ -28,27 +28,24 @@ jobs:
28
28
displayName :Download x86 msix
29
29
patterns :' **/*.msix'
30
30
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
50
32
displayName :Install makeappx tool
51
33
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"
52
49
53
50
-pwsh :|
54
51
$sourceDir = '$(Pipeline.Workspace)\releasePipeline\msix'