Skip to content

Commit

Permalink
🚀 (maint) Ensure build publishes Pester
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
vexx32 committed May 6, 2021
1 parent 9f56b06 commit d60ab61
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Deploy/Publish.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}

Expand Down

0 comments on commit d60ab61

Please sign in to comment.