Skip to content

Commit 6e5cb82

Browse files
authored
Merge pull request #1174 from microsoft/libtemplateUpdate
Merge latest Library.Template
2 parents 67da07f + c3dfe42 commit 6e5cb82

File tree

9 files changed

+15
-55
lines changed

9 files changed

+15
-55
lines changed

.config/dotnet-tools.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
"isRoot": true,
44
"tools": {
55
"powershell": {
6-
"version": "7.4.1",
6+
"version": "7.4.2",
77
"commands": [
88
"pwsh"
99
]
1010
},
1111
"dotnet-coverage": {
12-
"version": "17.10.3",
12+
"version": "17.11.0",
1313
"commands": [
1414
"dotnet-coverage"
1515
]
@@ -21,4 +21,4 @@
2121
]
2222
}
2323
}
24-
}
24+
}

Directory.Packages.props

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@
3434
<PackageVersion Include="System.Text.Encodings.Web" Version="4.7.1" />
3535
<PackageVersion Include="System.Text.Json" Version="4.7.2" />
3636
<PackageVersion Include="Xunit.Combinatorial" Version="1.6.24" />
37-
<PackageVersion Include="xunit.runner.visualstudio" Version="2.5.7" />
38-
<PackageVersion Include="xunit" Version="2.7.0" />
37+
<PackageVersion Include="xunit.runner.visualstudio" Version="2.8.0" />
38+
<PackageVersion Include="xunit" Version="2.8.0" />
3939
</ItemGroup>
4040
<ItemGroup Condition="'$(IsTestProject)'!='true'">
4141
<!-- These versions carefully chosen to support VS 2019 Update 11. -->

azure-pipelines/OptProf.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ stages:
7575
targetType: filePath
7676
filePath: $(Agent.TempDirectory)/Variables-Windows/_pipelines.ps1
7777
- task: NuGetCommand@2
78-
displayName: Push CoreXT packages to VS feed
78+
displayName: Push VS-repo packages to VS feed
7979
inputs:
8080
command: push
8181
packagesToPush: $(Agent.TempDirectory)/VSInsertion-Windows/*.nupkg

azure-pipelines/apiscan.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ jobs:
1414
displayName: 📢 collect apiscan artifact
1515
targetPath: $(Pipeline.Workspace)/.gdn/.r/apiscan/001/Logs
1616
artifactName: apiscan-logs
17+
condition: succeededOrFailed()
1718
variables:
1819
- name: SymbolsFeatureName
1920
value: $[ dependencies.Windows.outputs['SetPipelineVariables.SymbolsFeatureName'] ]

azure-pipelines/archive-sourcecode.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ parameters:
3030

3131
variables:
3232
- group: VS Core team # Expected to provide ManagerAlias, SourceCodeArchivalUri
33+
- template: GlobalVariables.yml
3334

3435
extends:
3536
template: azure-pipelines/MicroBuild.1ES.Official.yml@MicroBuildTemplate

azure-pipelines/artifacts/VSInsertion.ps1

Lines changed: 1 addition & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ if (!$BuildConfiguration) {
1616
$BuildConfiguration = 'Debug'
1717
}
1818

19-
$NuGetPackages = "$RepoRoot/bin/Packages/$BuildConfiguration/NuGet"
19+
$NuGetPackages = "$RepoRoot/bin/Packages/$BuildConfiguration"
2020

2121
if (!(Test-Path $NuGetPackages)) {
2222
Write-Warning "Skipping because NuGet packages haven't been built yet."
@@ -27,32 +27,4 @@ $result = @{
2727
"$NuGetPackages" = (Get-ChildItem $NuGetPackages -Recurse)
2828
}
2929

30-
if ($env:IsOptProf) {
31-
$CoreXTPackages = "$RepoRoot/bin/Packages/$BuildConfiguration/CoreXT"
32-
33-
$ArtifactBasePath = "$RepoRoot\obj\_artifacts"
34-
$ArtifactPath = "$ArtifactBasePath\VSInsertion"
35-
if (-not (Test-Path $ArtifactPath)) { New-Item -ItemType Directory -Path $ArtifactPath | Out-Null }
36-
37-
$profilingInputs = [xml](Get-Content -Path "$PSScriptRoot\..\ProfilingInputs.props")
38-
$profilingInputs.Project.ItemGroup.TestStore.Include = "vstsdrop:" + (& "$PSScriptRoot\..\variables\ProfilingInputsDropName.ps1")
39-
$profilingInputs.Save("$ArtifactPath\ProfilingInputs.props")
40-
41-
$InsertionMetadataVersion = $(dotnet tool run nbgv get-version -p "$RepoRoot\src" -f json | ConvertFrom-Json).NuGetPackageVersion
42-
if ($env:BUILD_BUILDID) {
43-
# We must ensure unique versions for the insertion metadata package so
44-
# it can contain information that is unique to this build.
45-
# In particular it includes the ProfilingInputsDropName, which contains the BuildId.
46-
# A non-unique package version here may collide with a prior run of this same commit,
47-
# ultimately resulting in a failure of the optprof run.
48-
$InsertionMetadataVersion += '.' + $env:BUILD_BUILDID
49-
}
50-
& (& "$PSScriptRoot\..\Get-NuGetTool.ps1") pack "$PSScriptRoot\..\InsertionMetadataPackage.nuspec" -OutputDirectory $CoreXTPackages -BasePath $ArtifactPath -Version $InsertionMetadataVersion | Out-Null
51-
if ($LASTEXITCODE -ne 0) {
52-
exit $LASTEXITCODE
53-
}
54-
55-
$result["$CoreXTPackages"] = (Get-ChildItem "$CoreXTPackages\LibraryName.VSInsertionMetadata.$InsertionMetadataVersion.nupkg");
56-
}
57-
5830
$result

azure-pipelines/dotnet.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ steps:
2828
condition: and(succeeded(), ${{ parameters.RunTests }})
2929

3030
- ${{ if parameters.IsOptProf }}:
31-
# We have to artifically run this script so that the extra .nupkg is produced for variables/InsertConfigValues.ps1 to notice.
31+
# We have to artifically run this script so that the extra .nupkg is produced for variables/InsertPropsValues.ps1 to notice.
3232
- powershell: azure-pipelines\artifacts\VSInsertion.ps1
3333
displayName: 🔧 Prepare VSInsertion artifact
3434

azure-pipelines/variables/InsertConfigValues.ps1

Lines changed: 0 additions & 14 deletions
This file was deleted.

azure-pipelines/variables/InsertPropsValues.ps1

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
$BinPath = [System.IO.Path]::GetFullPath("$PSScriptRoot\..\..\bin\Packages\$env:BUILDCONFIGURATION")
1+
$InsertedPkgs = (& "$PSScriptRoot\..\artifacts\VSInsertion.ps1")
22

3-
$dirsToSearch = "$BinPath\*.nupkg" |? { Test-Path $_ }
43
$icv=@()
5-
if ($dirsToSearch) {
6-
Get-ChildItem -Path $dirsToSearch |% {
7-
if ($_.Name -match "^(.*)\.(\d+\.\d+\.\d+(?:-.*?)?)(?:\.symbols)?\.nupkg$") {
4+
foreach ($kvp in $InsertedPkgs.GetEnumerator()) {
5+
$kvp.Value |% {
6+
if ($_.Name -match "^(.*?)\.(\d+\.\d+\.\d+(?:\.\d+)?(?:-.*?)?)(?:\.symbols)?\.nupkg$") {
87
$id = $Matches[1]
98
$version = $Matches[2]
9+
$icv += "$id=$version"
1010
}
1111
}
1212
}

0 commit comments

Comments
 (0)