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 1ee7adb

Browse files
OneBranch now uses PowerShell 7.4 so remove workarounds (#2218)
We can rely on the pre-installed PSResourceGet and we can re-enable tests!
1 parent e26f172 commit 1ee7adb

File tree

2 files changed

+15
-7
lines changed

2 files changed

+15
-7
lines changed

‎.pipelines/PowerShellEditorServices-Official.yml‎

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -88,12 +88,9 @@ extends:
8888
inputs:
8989
packageType: runtime
9090
version: 6.x
91-
- pwsh: |
92-
Register-PSRepository -Name CFS -SourceLocation "https://pkgs.dev.azure.com/powershell/PowerShell/_packaging/powershell/nuget/v2" -InstallationPolicy Trusted
93-
Install-Module -Repository CFS -Name Microsoft.PowerShell.PSResourceGet
94-
./tools/installPSResources.ps1 -PSRepository CFS
91+
- pwsh: ./tools/installPSResources.ps1 -PSRepository CFS
9592
displayName: Install PSResources
96-
- pwsh: Invoke-Build Build -Configuration $(BuildConfiguration) -PSRepository CFS
93+
- pwsh: Invoke-Build TestFull -Configuration $(BuildConfiguration) -PSRepository CFS
9794
displayName: Build and test
9895
- task: PublishTestResults@2
9996
displayName: Publish test results

‎tools/installPSResources.ps1‎

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,16 @@ if ($PSRepository -eq "CFS" -and -not (Get-PSResourceRepository -Name CFS -Error
99
Register-PSResourceRepository -Name CFS -Uri "https://pkgs.dev.azure.com/powershell/PowerShell/_packaging/powershell/nuget/v3/index.json"
1010
}
1111

12-
Install-PSResource -Repository $PSRepository -TrustRepository -Name InvokeBuild
13-
Install-PSResource -Repository $PSRepository -TrustRepository -Name platyPS
12+
# NOTE: Due to a bug in Install-PSResource with upstream feeds, we have to
13+
# request an exact version. Otherwise, if a newer version is available in the
14+
# upstream feed, it will fail to install any version at all.
15+
Install-PSResource -Verbose -TrustRepository -RequiredResource @{
16+
InvokeBuild = @{
17+
version = "5.12.1"
18+
repository = $PSRepository
19+
}
20+
platyPS = @{
21+
version = "0.14.2"
22+
repository = $PSRepository
23+
}
24+
}

0 commit comments

Comments
(0)

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