From d60ab6139647846327c13b2b79364db83995ae40 Mon Sep 17 00:00:00 2001 From: Joel Sallow <32407840+vexx32@users.noreply.github.com> Date: Thu, 6 May 2021 12:11:20 -0400 Subject: [PATCH] :rocket: (maint) Ensure build publishes Pester In some cases it looks like Pester can fail to publish if there are too many versions of Pester available. Prevent this by checking the version we actually need and publishing just that version when doing a publish to the filesystem. --- Deploy/Publish.ps1 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Deploy/Publish.ps1 b/Deploy/Publish.ps1 index b567722a4..b17e3e5c6 100644 --- a/Deploy/Publish.ps1 +++ b/Deploy/Publish.ps1 @@ -16,12 +16,12 @@ if ($OutputDirectory) { Import-Module "$PSScriptRoot/PSKoans" $Module = Get-Module -Name PSKoans $Dependencies = @( - $Module.RequiredModules.Name - $Module.NestedModules.Name + $Module.RequiredModules | Select-Object -Property Name, Version + $Module.NestedModules | Select-Object -Property Name, Version ).Where{ $_ } foreach ($Module in $Dependencies) { - Publish-Module -Name $Module -Repository FileSystem -NugetApiKey "Test-Publish" + Publish-Module -Name $Module.Name -Repository FileSystem -NugetApiKey "Test-Publish" -RequiredVersion $Module.Version } }