diff --git a/src/Generate-DockerImageVariantsHelpers/public/Update-DockerImageVariantsVersions.Tests.ps1 b/src/Generate-DockerImageVariantsHelpers/public/Update-DockerImageVariantsVersions.Tests.ps1 index 4135806..e3e7789 100644 --- a/src/Generate-DockerImageVariantsHelpers/public/Update-DockerImageVariantsVersions.Tests.ps1 +++ b/src/Generate-DockerImageVariantsHelpers/public/Update-DockerImageVariantsVersions.Tests.ps1 @@ -60,6 +60,7 @@ Describe "Update-DockerImageVariantsVersions" -Tag 'Unit' { "versions": [ "0.1.0" ], + "versionsChangeScope": "minor", "versionsNewScript": "@( 'some versions' )" } } diff --git a/src/Generate-DockerImageVariantsHelpers/public/Update-DockerImageVariantsVersions.ps1 b/src/Generate-DockerImageVariantsHelpers/public/Update-DockerImageVariantsVersions.ps1 index e17d95b..bfd88a1 100644 --- a/src/Generate-DockerImageVariantsHelpers/public/Update-DockerImageVariantsVersions.ps1 +++ b/src/Generate-DockerImageVariantsHelpers/public/Update-DockerImageVariantsVersions.ps1 @@ -53,7 +53,8 @@ function Update-DockerImageVariantsVersions { if ($null -eq $versionsNew) { throw "$pkg.versionsNewScript returned null. It should return an array of versions (semver)." } - Get-VersionsChanged -Versions $versions -VersionsNew $versionsNew -AsObject -Descending + $changeScope = $versionsConfig.$pkg.versionsChangeScope + Get-VersionsChanged -Versions $versions -VersionsNew $versionsNew -ChangeScope $changeScope -AsObject -Descending } $changedCount = ($versionsChanged.Values | ? { $_['kind'] -ne 'existing' } | Measure-Object).Count