Skip to content

Commit cc4f63f

Browse files
authored
Merge pull request #1359 from microsoft/libtemplateUpdate
Merge latest Library.Template
2 parents 2ac34d4 + 1719dd3 commit cc4f63f

32 files changed

+559
-94
lines changed

.config/dotnet-tools.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,19 @@
33
"isRoot": true,
44
"tools": {
55
"powershell": {
6-
"version": "7.4.4",
6+
"version": "7.4.6",
77
"commands": [
88
"pwsh"
99
]
1010
},
1111
"dotnet-coverage": {
12-
"version": "17.11.3",
12+
"version": "17.12.6",
1313
"commands": [
1414
"dotnet-coverage"
1515
]
1616
},
1717
"nbgv": {
18-
"version": "3.6.139",
18+
"version": "3.6.146",
1919
"commands": [
2020
"nbgv"
2121
]

.devcontainer/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Refer to https://hub.docker.com/_/microsoft-dotnet-sdk for available versions
2-
FROM mcr.microsoft.com/dotnet/sdk:8.0.300-jammy
2+
FROM mcr.microsoft.com/dotnet/sdk:8.0.402-jammy
33

44
# Installing mono makes `dotnet test` work without errors even for net472.
55
# But installing it takes a long time, so it's excluded by default.
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
name: Library.Template update
2+
3+
# PREREQUISITE: This workflow requires the repo to be configured to allow workflows to push commits and create pull requests.
4+
# Visit https://github.com/USER/REPO/settings/actions
5+
# Under "Workflow permissions", select "Read and write permissions" and check "Allow GitHub Actions to create ...pull requests"
6+
# Click Save.
7+
8+
on:
9+
schedule:
10+
- cron: "0 3 * * Mon" # Sun @ 8 or 9 PM Mountain Time (depending on DST)
11+
workflow_dispatch:
12+
13+
jobs:
14+
merge:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v4
18+
with:
19+
fetch-depth: 0 # avoid shallow clone so nbgv can do its work.
20+
21+
- name: merge
22+
shell: pwsh
23+
run: |
24+
$LibTemplateBranch = & ./azure-pipelines/Get-LibTemplateBasis.ps1 -ErrorIfNotRelated
25+
if ($LASTEXITCODE -ne 0) {
26+
exit $LASTEXITCODE
27+
}
28+
29+
git fetch https://github.com/aarnott/Library.Template $LibTemplateBranch
30+
if ($LASTEXITCODE -ne 0) {
31+
exit $LASTEXITCODE
32+
}
33+
$LibTemplateCommit = git rev-parse FETCH_HEAD
34+
35+
if ((git rev-list FETCH_HEAD ^HEAD --count) -eq 0) {
36+
Write-Host "There are no Library.Template updates to merge."
37+
exit 0
38+
}
39+
40+
git -c http.extraheader="AUTHORIZATION: bearer $env:GH_TOKEN" push origin -u FETCH_HEAD:refs/heads/auto/libtemplateUpdate
41+
- name: pull request
42+
shell: pwsh
43+
run: |
44+
# If there is already an active pull request, don't create a new one.
45+
$existingPR = gh pr list -H auto/libtemplateUpdate --json url | ConvertFrom-Json
46+
if ($existingPR) {
47+
Write-Host "::warning::Skipping pull request creation because one already exists at $($existingPR[0].url)"
48+
exit 0
49+
}
50+
51+
$prTitle = "Merge latest Library.Template"
52+
$prBody = "This merges the latest features and fixes from [Library.Template's branch](https://github.com/AArnott/Library.Template/tree/).
53+
54+
<details>
55+
<summary>Merge conflicts?</summary>
56+
Resolve merge conflicts locally by carrying out these steps:
57+
58+
```
59+
git fetch
60+
git checkout auto/libtemplateUpdate
61+
git merge origin/main
62+
# resolve conflicts
63+
git commit
64+
git push
65+
```
66+
</details>
67+
68+
⚠️ Do **not** squash this pull request when completing it. You must *merge* it."
69+
70+
gh pr create -H auto/libtemplateUpdate -b $prBody -t $prTitle
71+
env:
72+
GH_TOKEN: ${{ github.token }}

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ bld/
3737
# Uncomment if you have tasks that create the project's static files in wwwroot
3838
#wwwroot/
3939

40+
# Jetbrains Rider cache directory
41+
.idea/
42+
4043
# Visual Studio 2017 auto generated files
4144
Generated\ Files/
4245

Directory.Build.props

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
<BaseIntermediateOutputPath>$(RepoRootPath)obj\$([MSBuild]::MakeRelative($(RepoRootPath), $(MSBuildProjectDirectory)))\</BaseIntermediateOutputPath>
77
<BaseOutputPath Condition=" '$(BaseOutputPath)' == '' ">$(RepoRootPath)bin\$(MSBuildProjectName)\</BaseOutputPath>
88
<PackageOutputPath>$(RepoRootPath)bin\Packages\$(Configuration)\NuGet\</PackageOutputPath>
9+
<VSIXOutputPath>$(RepoRootPath)bin\Packages\$(Configuration)\Vsix\$(Platform)\</VSIXOutputPath>
910
<Nullable>enable</Nullable>
1011
<ImplicitUsings>disable</ImplicitUsings>
1112
<AnalysisLevel>latest</AnalysisLevel>

Directory.Packages.props

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<PropertyGroup>
55
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
66
<CentralPackageTransitivePinningEnabled>true</CentralPackageTransitivePinningEnabled>
7-
<MicroBuildVersion>2.0.162</MicroBuildVersion>
7+
<MicroBuildVersion>2.0.165</MicroBuildVersion>
88
<CodeAnalysisVersion>3.11.0</CodeAnalysisVersion>
99
<CodeAnalysisVersion Condition="'$(IsTestProject)'=='true'">4.4.0</CodeAnalysisVersion>
1010
<CodefixTestingVersion>1.1.1</CodefixTestingVersion>
@@ -25,7 +25,7 @@
2525
<PackageVersion Include="Microsoft.CodeAnalysis.VisualBasic.CodeFix.Testing.XUnit" Version="$(CodefixTestingVersion)" />
2626
<PackageVersion Include="Microsoft.Diagnostics.Runtime.Utilities" Version="$(MicrosoftDiagnosticsRuntimeVersion)" />
2727
<PackageVersion Include="Microsoft.Diagnostics.Runtime" Version="$(MicrosoftDiagnosticsRuntimeVersion)" />
28-
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.10.0" />
28+
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
2929
<PackageVersion Include="Microsoft.VisualStudio.Internal.MicroBuild.NonShipping" Version="$(MicroBuildVersion)" />
3030
<PackageVersion Include="Microsoft.VisualStudio.Interop" Version="17.4.33103.184" />
3131
<PackageVersion Include="Microsoft.VisualStudio.Shell.15.0" Version="17.4.33103.184" />
@@ -44,14 +44,14 @@
4444
<PackageVersion Include="xunit.runner.visualstudio" Version="2.8.2" />
4545
<PackageVersion Include="Xunit.SkippableFact" Version="1.4.13" />
4646
<PackageVersion Include="Xunit.StaFact" Version="1.1.11" />
47-
<PackageVersion Include="xunit" Version="2.9.0" />
47+
<PackageVersion Include="xunit" Version="2.9.2" />
4848
</ItemGroup>
4949
<ItemGroup>
5050
<GlobalPackageReference Include="CSharpIsNullAnalyzer" Version="0.1.593" />
5151
<GlobalPackageReference Include="DotNetAnalyzers.DocumentationAnalyzers" Version="1.0.0-beta.59" />
5252
<GlobalPackageReference Include="IsExternalInit" Version="1.0.3" />
5353
<GlobalPackageReference Include="Microsoft.VisualStudio.Internal.MicroBuild.VisualStudio" Version="$(MicroBuildVersion)" />
54-
<GlobalPackageReference Include="Nerdbank.GitVersioning" Version="3.6.139" />
54+
<GlobalPackageReference Include="Nerdbank.GitVersioning" Version="3.6.146" />
5555
<GlobalPackageReference Include="StyleCop.Analyzers.Unstable" Version="1.2.0.556" />
5656
</ItemGroup>
5757
</Project>
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<#
2+
.SYNOPSIS
3+
Returns the name of the well-known branch in the Library.Template repository upon which HEAD is based.
4+
#>
5+
[CmdletBinding(SupportsShouldProcess = $true)]
6+
Param(
7+
[switch]$ErrorIfNotRelated
8+
)
9+
10+
# This list should be sorted in order of decreasing specificity.
11+
$branchMarkers = @(
12+
@{ commit = 'fd0a7b25ccf030bbd16880cca6efe009d5b1fffc'; branch = 'microbuild' };
13+
@{ commit = '05f49ce799c1f9cc696d53eea89699d80f59f833'; branch = 'main' };
14+
)
15+
16+
foreach ($entry in $branchMarkers) {
17+
if (git rev-list HEAD | Select-String -Pattern $entry.commit) {
18+
return $entry.branch
19+
}
20+
}
21+
22+
if ($ErrorIfNotRelated) {
23+
Write-Error "Library.Template has not been previously merged with this repo. Please review https://github.com/AArnott/Library.Template/tree/main?tab=readme-ov-file#readme for instructions."
24+
exit 1
25+
}

azure-pipelines/GlobalVariables.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,5 @@ variables:
22
# These variables are required for MicroBuild tasks
33
TeamName: VS Core - Special Projects
44
TeamEmail: [email protected]
5+
# These variables influence insertion pipelines
6+
ContainsVsix: false # This should be true when the repo builds a VSIX that should be inserted to VS.

azure-pipelines/OptProf.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ variables:
2929
value: false # avoid using nice version since we're building a preliminary/unoptimized package
3030
- name: IsOptProf
3131
value: true
32+
- name: MicroBuild_NuPkgSigningEnabled
33+
value: false # test-signed nuget packages fail to restore in the VS insertion PR validations. Just don't sign them *at all*.
3234

3335
stages:
3436
- stage: Library
@@ -40,12 +42,13 @@ stages:
4042
- template: build.yml
4143
parameters:
4244
Is1ESPT: false
43-
RealSign: true
45+
RealSign: false
4446
windowsPool: VSEngSS-MicroBuild2022-1ES
4547
EnableMacOSBuild: false
4648
ShouldSkipOptimize: ${{ parameters.ShouldSkipOptimize }}
4749
IsOptProf: true
4850
RunTests: false
51+
SkipCodesignVerify: true
4952
- stage: QueueVSBuild
5053
jobs:
5154
- job: QueueOptProf

azure-pipelines/OptProf_part2.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ resources:
1414
- pipeline: DartLab.OptProf
1515
source: DartLab.OptProf
1616
branch: main
17+
tags:
18+
- production
1719
repositories:
1820
- repository: DartLabTemplates
1921
type: git
@@ -22,7 +24,7 @@ resources:
2224
- repository: DartLabOptProfTemplates
2325
type: git
2426
name: DartLab.OptProf
25-
ref: refs/heads/main
27+
ref: refs/tags/Production
2628

2729
parameters:
2830

0 commit comments

Comments
 (0)