Skip to content

Commit

Permalink
Merge pull request #104 from theohbrothers/fix/fix-update-dockerimage…
Browse files Browse the repository at this point in the history
…variantsversions-to-use-array-for-.versions-of-versions.json

Fix: Fix `Update-DockerImageVariantsVersions` to use array for `.versions` of `versions.json`
  • Loading branch information
leojonathanoh authored Oct 21, 2023
2 parents 9d8a082 + b053215 commit 37027f7
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,9 @@ function Update-DockerImageVariantsVersions {
$vc['to']
$versionsConfig.$pkg.versions
)
$versionsConfig.$pkg.versions = $versionsUpdated | Select-Object -Unique | Sort-Object { [version]$_ } -Descending
$versionsConfig.$pkg.versions = @(
$versionsUpdated | Select-Object -Unique | Sort-Object { [version]$_ } -Descending
)
Set-DockerImageVariantsVersions -Versions $versionsConfig
if ($PR) {
$prs += $_pr = New-DockerImageVariantsPR -Package $pkg -Version $vc['to'] -Verb add -CommitPreScriptblock $CommitPreScriptblock
Expand All @@ -93,7 +95,9 @@ function Update-DockerImageVariantsVersions {
$versionsUpdated.Add($v) > $null
}
}
$versionsConfig.$pkg.versions = $versionsUpdated | Select-Object -Unique | Sort-Object { [version]$_ } -Descending
$versionsConfig.$pkg.versions = @(
$versionsUpdated | Select-Object -Unique | Sort-Object { [version]$_ } -Descending
)
Set-DockerImageVariantsVersions -Versions $versionsConfig
if ($PR) {
$prs += $_pr = New-DockerImageVariantsPR -Package $pkg -Version $vc['from'] -VersionNew $vc['to'] -Verb update -CommitPreScriptblock $CommitPreScriptblock
Expand Down

0 comments on commit 37027f7

Please sign in to comment.