Merge pull request #17 from loanDepot/kmarquette/issue-16

add better handling of $null values when setting the version
This commit is contained in:
Kevin Marquette
2018-10-16 10:55:52 -07:00
committed by GitHub

View File

@@ -62,14 +62,10 @@ task SetVersion {
"Downloading published module to check for breaking changes" "Downloading published module to check for breaking changes"
$publishedModule | Save-Module -Path $downloadFolder $publishedModule | Save-Module -Path $downloadFolder
[System.Collections.Generic.HashSet[string]] $publishedInterface = GetModulePublicInterfaceMap -Path (Join-Path $downloadFolder $ModuleName) [System.Collections.Generic.HashSet[string]] $publishedInterface = @(GetModulePublicInterfaceMap -Path (Join-Path $downloadFolder $ModuleName))
[System.Collections.Generic.HashSet[string]] $buildInterface = GetModulePublicInterfaceMap -Path $ManifestPath [System.Collections.Generic.HashSet[string]] $buildInterface = @(GetModulePublicInterfaceMap -Path $ManifestPath)
if ($null -eq $publishedInterface)
{
$publishedInterface = [System.Collections.Generic.HashSet[string]]::new()
}
if( -not $publishedInterface.IsSubsetOf($buildInterface)) if (-not $publishedInterface.IsSubsetOf($buildInterface))
{ {
$bumpVersionType = 'Major' $bumpVersionType = 'Major'
} }