Skip to content

Commit 901bfa3

Browse files
scbeddazure-sdk
authored andcommitted
CIMatrixConfig null coalesce operator. Add the property CIMatrixConfigs
1 parent 5bd2df1 commit 901bfa3

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

eng/common/scripts/Package-Properties.ps1

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ class PackageProps
2121
# additional packages required for validation of this one
2222
[string[]]$AdditionalValidationPackages
2323
[HashTable]$ArtifactDetails
24+
[HashTable[]]$CIMatrixConfigs
2425

2526
PackageProps([string]$name, [string]$version, [string]$directoryPath, [string]$serviceDirectory)
2627
{

eng/common/scripts/job-matrix/Create-PrJobMatrix.ps1

+1-3
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,7 @@ $packageProperties = Get-ChildItem -Recurse "$PackagePropertiesFolder" *.json `
6464

6565
# set default matrix config for each package if there isn't an override
6666
$packageProperties | ForEach-Object {
67-
if (-not $_.CIMatrixConfigs) {
68-
$_.CIMatrixConfigs = $configs
69-
}
67+
$_.CIMatrixConfigs = $_.CIMatrixConfigs ?? $configs
7068
}
7169

7270
# The key here is that after we group the packages by the matrix config objects, we can use the first item's MatrixConfig

0 commit comments

Comments
 (0)