|
5 | 5 |
|
6 | 6 | steps:
|
7 | 7 | - task: PowerShell@2
|
8 |
| - displayName: Install PS 7.2 |
| 8 | + displayName: Install PowerShell |
9 | 9 | inputs:
|
10 | 10 | targetType: 'inline'
|
11 | 11 | script: |
|
12 |
| - $url = "https://github.com/PowerShell/PowerShell/releases/download/v7.2.0-preview.3/PowerShell-7.2.0-preview.3-win-x64.zip" |
13 |
| - $output = Join-Path -Path $(Pipeline.Workspace) -ChildPath "./PowerShell-7.2.0-preview.3-win-x64.zip" |
| 12 | + $url = "https://github.com/PowerShell/PowerShell/releases/download/v7.2.0/PowerShell-7.2.0-win-x64.zip" |
| 13 | + $output = Join-Path -Path $(Pipeline.Workspace) -ChildPath "./PowerShell-7.2.0-win-x64.zip" |
14 | 14 | (New-Object System.Net.WebClient).DownloadFile($url, $output)
|
15 |
| - $pwshPath= Join-Path -Path $(Pipeline.Workspace) -ChildPath "./PowerShell-7.2.0-preview.3/" |
| 15 | + $pwshPath= Join-Path -Path $(Pipeline.Workspace) -ChildPath "./PowerShell/" |
16 | 16 | Expand-Archive -Path $output -DestinationPath $pwshPath
|
17 | 17 | $pwshFullPath = Convert-Path $pwshPath
|
18 | 18 | Write-Host $pwshFullPath
|
19 | 19 |
|
20 | 20 | - task: PowerShell@2
|
21 |
| - displayName: 'Install platyPS, PowerShellGet, Az 3.0.0' |
| 21 | + displayName: 'Install Dependent Modules' |
22 | 22 | inputs:
|
23 | 23 | targetType: inline
|
24 | 24 | script: |
|
25 |
| - $pwshPath= Join-Path -Path $(Pipeline.Workspace) -ChildPath "./PowerShell-7.2.0-preview.3/pwsh.exe" |
| 25 | + $pwshPath= Join-Path -Path $(Pipeline.Workspace) -ChildPath "./PowerShell/pwsh.exe" |
26 | 26 | $command = "`$PSVersionTable `
|
27 | 27 | Install-Module platyPS -Force -Confirm:`$false -Scope CurrentUser `
|
28 | 28 | Install-Module PowerShellGet -Force -Confirm:`$false -Scope CurrentUser -SkipPublisherCheck `
|
29 |
| - Install-Module Az -Repository PSGallery -RequiredVersion 3.0.0 -Confirm:`$false -Scope CurrentUser -AllowClobber -Force" |
| 29 | + Install-Module PSReadLine -Force -Confirm:`$false -Scope CurrentUser ` |
| 30 | + Install-Module Az.Accounts -Repository PSGallery -Confirm:`$false -Scope CurrentUser -AllowClobber -Force" |
30 | 31 | Invoke-Command -ScriptBlock { param ($pwshPath, $command) & $pwshPath -Command $command } -ArgumentList $pwshPath, $command
|
31 | 32 |
|
32 | 33 | - task: UseDotNet@2
|
|
41 | 42 | inputs:
|
42 | 43 | command: custom
|
43 | 44 | custom: msbuild
|
44 |
| - arguments: 'tools\Az.Tools.Predictor\build.proj /target:"Clean;Build;GenerateHelp" /p:Configuration=Release /p:PowerShellCoreCommandPrefix="$(Pipeline.Workspace)\\PowerShell-7.2.0-preview.3\\pwsh.exe -NonInteractive -NoLogo -NoProfile -Command"' |
| 45 | + arguments: 'tools\Az.Tools.Predictor\build.proj /target:"Clean;Build;GenerateHelp" /p:Configuration=Release /p:PowerShellCoreCommandPrefix="$(Pipeline.Workspace)\\PowerShell\\pwsh.exe -NonInteractive -NoLogo -NoProfile -Command"' |
45 | 46 |
|
46 | 47 | - task: UseDotNet@2
|
47 | 48 | displayName: 'Install DotNet 2.1 Runtime for Signing'
|
|
90 | 91 | inputs:
|
91 | 92 | command: custom
|
92 | 93 | custom: msbuild
|
93 |
| - arguments: 'tools\Az.Tools.Predictor\build.proj /target:"Package" /p:Configuration=Release /p:PowerShellCoreCommandPrefix="$(Pipeline.Workspace)\\PowerShell-7.2.0-preview.3\\pwsh.exe -NonInteractive -NoLogo -NoProfile -Command" ' |
| 94 | + arguments: 'tools\Az.Tools.Predictor\build.proj /target:"Package" /p:Configuration=Release /p:PowerShellCoreCommandPrefix="$(Pipeline.Workspace)\\PowerShell\\pwsh.exe -NonInteractive -NoLogo -NoProfile -Command" ' |
94 | 95 |
|
95 | 96 | - task: PublishPipelineArtifact@0
|
96 | 97 | displayName: 'Save artifacts'
|
|
0 commit comments