Skip to content

Commit

Permalink
Feature: Add support for <pkg>.versionsChangeScope in `Update-Docke…
Browse files Browse the repository at this point in the history
…rImageVariantsVersions`
  • Loading branch information
leojonathanoh committed Sep 21, 2023
1 parent f639f35 commit f863164
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ Describe "Update-DockerImageVariantsVersions" -Tag 'Unit' {
"versions": [
"0.1.0"
],
"versionsChangeScope": "minor",
"versionsNewScript": "@( 'some versions' )"
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f863164

Please sign in to comment.