File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change 11steps :
2+ - powershell : |
3+ Write-Host "Installing pwsh..."
4+ if (Get-Command pwsh -ErrorAction Ignore)
5+ {
6+ Write-Host "pwsh already installed, skipping"
7+ return
8+ }
9+ $powerShellPath = Join-Path -Path $env:AGENT_TEMPDIRECTORY -ChildPath 'powershell'
10+ Invoke-WebRequest -Uri https://raw.githubusercontent.com/PowerShell/PowerShell/master/tools/install-powershell.ps1 -outfile ./install-powershell.ps1
11+ ./install-powershell.ps1 -Destination $powerShellPath
12+ $vstsCommandString = "vso[task.setvariable variable=PATH]$powerShellPath;$env:PATH"
13+ Write-Host "sending " + $vstsCommandString
14+ Write-Host "##$vstsCommandString"
15+ displayName : Install PowerShell Core
16+
217- pwsh : Write-Host "##vso[build.updatebuildnumber]$env:BUILD_SOURCEBRANCHNAME-$env:BUILD_SOURCEVERSION-$((get-date).ToString("yyyyMMddhhmmss"))"
318 displayName : Set Build Name for Non-PR
419 condition : ne(variables['Build.Reason'], 'PullRequest')
You can’t perform that action at this time.
0 commit comments