Skip to content

Commit 9dce0e2

Browse files
committed
Filter VSInsertionMetadata from default.config world
1 parent 48d1820 commit 9dce0e2

File tree

2 files changed

+16
-3
lines changed

2 files changed

+16
-3
lines changed

azure-pipelines/variables/InsertConfigValues.ps1

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ $InsertedPkgs = (& "$PSScriptRoot\..\artifacts\VSInsertion.ps1")
33
$icv=@()
44
foreach ($kvp in $InsertedPkgs.GetEnumerator()) {
55
$kvp.Value |% {
6-
if ($_.Name -match "^(.*?)\.(\d+\.\d+\.\d+(?:\.\d+)?(?:-.*?)?)(?:\.symbols)?\.nupkg$") {
6+
# Skip VSInsertionMetadata packages for default.config world, which doesn't use it any more.
7+
if (($_.Name -match "^(.*?)\.(\d+\.\d+\.\d+(?:\.\d+)?(?:-.*?)?)(?:\.symbols)?\.nupkg$") -and $_.Name -notmatch 'VSInsertionMetadata') {
78
$id = $Matches[1]
89
$version = $Matches[2]
910
$icv += "$id=$version"
Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,14 @@
1-
# These values are commonly the same.
2-
& "$PSScriptRoot/InsertConfigValues.ps1"
1+
$InsertedPkgs = (& "$PSScriptRoot\..\artifacts\VSInsertion.ps1")
2+
3+
$icv=@()
4+
foreach ($kvp in $InsertedPkgs.GetEnumerator()) {
5+
$kvp.Value |% {
6+
if ($_.Name -match "^(.*?)\.(\d+\.\d+\.\d+(?:\.\d+)?(?:-.*?)?)(?:\.symbols)?\.nupkg$") {
7+
$id = $Matches[1]
8+
$version = $Matches[2]
9+
$icv += "$id=$version"
10+
}
11+
}
12+
}
13+
14+
Write-Output ([string]::join(',',$icv))

0 commit comments

Comments
 (0)