add better handling of $null values when setting the version
This commit is contained in:
@@ -62,14 +62,10 @@ task SetVersion {
|
||||
"Downloading published module to check for breaking changes"
|
||||
$publishedModule | Save-Module -Path $downloadFolder
|
||||
|
||||
[System.Collections.Generic.HashSet[string]] $publishedInterface = GetModulePublicInterfaceMap -Path (Join-Path $downloadFolder $ModuleName)
|
||||
[System.Collections.Generic.HashSet[string]] $buildInterface = GetModulePublicInterfaceMap -Path $ManifestPath
|
||||
if ($null -eq $publishedInterface)
|
||||
{
|
||||
$publishedInterface = [System.Collections.Generic.HashSet[string]]::new()
|
||||
}
|
||||
[System.Collections.Generic.HashSet[string]] $publishedInterface = @(GetModulePublicInterfaceMap -Path (Join-Path $downloadFolder $ModuleName))
|
||||
[System.Collections.Generic.HashSet[string]] $buildInterface = @(GetModulePublicInterfaceMap -Path $ManifestPath)
|
||||
|
||||
if( -not $publishedInterface.IsSubsetOf($buildInterface))
|
||||
if (-not $publishedInterface.IsSubsetOf($buildInterface))
|
||||
{
|
||||
$bumpVersionType = 'Major'
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user