Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 95ab062

Browse files
authored
[Ignore] Add pwsh install step to build (#2483)
1 parent 07e3bc1 commit 95ab062

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

‎.vsts-ci/templates/release-general.yml‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,19 @@
11
steps:
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')

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /