Skip to content

Commit af12112

Browse files
authored
Merge branch 'main' into merge/release/10.0.1xx-to-main
2 parents 9fea2ad + 3186232 commit af12112

File tree

94 files changed

+876
-439
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

94 files changed

+876
-439
lines changed

.editorconfig

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,10 @@ dotnet_diagnostic.IDE0200.severity = none
280280
dotnet_diagnostic.IDE0240.severity = warning
281281

282282
# Additional rules for template engine source code
283+
284+
# Default severity for analyzer diagnostics with category 'StyleCop.CSharp.SpacingRules'
285+
dotnet_analyzer_diagnostic.category-StyleCop.CSharp.SpacingRules.severity = none
286+
283287
[{src,test}/**{Microsoft.TemplateEngine.*,dotnet-new?*}/**.cs]
284288
# Default analyzed API surface = 'public' (public APIs)
285289
dotnet_code_quality.api_surface = public

.github/workflows/copilot-setup-steps.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,18 @@ jobs:
3131
- name: Check dotnet version
3232
run: |
3333
dotnet --version
34+
35+
# For MCP servers like nuget's
36+
- name: Install .NET 10.x
37+
uses: actions/setup-dotnet@v4
38+
with:
39+
dotnet-version: |
40+
10.x
41+
dotnet-quality: preview
42+
43+
# for MCP servers
44+
- name: Install .NET 8.x
45+
uses: actions/setup-dotnet@v4
46+
with:
47+
dotnet-version: |
48+
8.x
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: PR Main Branch Warning
2+
on:
3+
pull_request_target:
4+
types: [opened]
5+
branches:
6+
- main
7+
8+
permissions:
9+
pull-requests: write
10+
11+
jobs:
12+
comment:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Add warning comment to PR targeting main
16+
uses: actions/github-script@v7
17+
with:
18+
script: |
19+
github.rest.issues.createComment({
20+
issue_number: context.payload.pull_request.number,
21+
owner: context.repo.owner,
22+
repo: context.repo.repo,
23+
body: `This PR is targeting \`main\`, which is now for .NET 11-facing work. If you intended to target .NET 10, either retarget this PR to \`release/10.0.1xx\` or make sure you backport the change to \`release/10.0.1xx\` after merging. See https://github.com/dotnet/sdk/issues/50394 for more details.`
24+
})

.github/workflows/update-man-pages.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ jobs:
1414
steps:
1515
- name: Checkout repository code
1616
uses: actions/checkout@v4
17+
with:
18+
ref: release/10.0.1xx
1719

1820
- name: Update man-pages
1921
run: |
@@ -38,7 +40,7 @@ jobs:
3840
git checkout -b $branch
3941
git commit -m "$title"
4042
git push -u origin $branch --force
41-
gh pr create --base main --head $branch --title "$title" --body "$body"
43+
gh pr create --base release/10.0.1xx --head $branch --title "$title" --body "$body"
4244
fi
4345
env:
4446
GH_TOKEN: ${{ github.token }}
Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
name: Update Static Web Assets Baselines
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
pr_number:
7+
description: 'Pull Request number'
8+
required: true
9+
type: string
10+
11+
jobs:
12+
update-baselines:
13+
runs-on: ubuntu-latest
14+
permissions:
15+
contents: write
16+
pull-requests: write
17+
18+
steps:
19+
- name: Checkout repository
20+
uses: actions/checkout@v4
21+
with:
22+
token: ${{ secrets.GITHUB_TOKEN }}
23+
fetch-depth: 0
24+
25+
- name: Checkout PR branch
26+
run: |
27+
gh pr checkout ${{ github.event.inputs.pr_number }}
28+
env:
29+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
30+
31+
- name: Run build script
32+
id: build
33+
run: |
34+
chmod +x ./build.sh
35+
./build.sh -c Release
36+
continue-on-error: true
37+
38+
- name: Update baselines
39+
id: update
40+
if: steps.build.outcome == 'success'
41+
run: |
42+
# Set DOTNET_ROOT to the local dotnet installation
43+
export DOTNET_ROOT="$(pwd)/.dotnet"
44+
# Prepend DOTNET_ROOT to PATH
45+
export PATH="$DOTNET_ROOT:$PATH"
46+
47+
# Run the update baselines script
48+
chmod +x src/RazorSdk/update-test-baselines.sh
49+
src/RazorSdk/update-test-baselines.sh
50+
continue-on-error: true
51+
52+
- name: Check for changes
53+
id: check-changes
54+
if: steps.update.outcome == 'success'
55+
run: |
56+
# Check if there are changes to any *.json files under the test folder
57+
if git diff --name-only | grep -E '^test/.*\.json$'; then
58+
echo "changes=true" >> $GITHUB_OUTPUT
59+
else
60+
echo "changes=false" >> $GITHUB_OUTPUT
61+
fi
62+
63+
- name: Commit and push changes
64+
id: commit
65+
if: steps.update.outcome == 'success' && steps.check-changes.outputs.changes == 'true'
66+
run: |
67+
git config --global user.name 'github-actions[bot]'
68+
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
69+
70+
# Create commit with formatted date
71+
COMMIT_DATE=$(date -u +"%Y-%m-%d")
72+
git add test/**/*.json
73+
git commit -m "[Infrastructure] Update baselines $COMMIT_DATE"
74+
75+
# Push to the PR branch
76+
git push
77+
continue-on-error: true
78+
79+
- name: Comment on PR - No changes
80+
if: steps.update.outcome == 'success' && steps.check-changes.outputs.changes == 'false'
81+
run: |
82+
gh pr comment ${{ github.event.inputs.pr_number }} \
83+
--body "No baselines were updated."
84+
env:
85+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
86+
87+
- name: Comment on PR - Changes pushed
88+
if: steps.commit.outcome == 'success'
89+
run: |
90+
gh pr comment ${{ github.event.inputs.pr_number }} \
91+
--body "Baselines updated."
92+
env:
93+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
94+
95+
- name: Comment on PR - Failure
96+
if: steps.build.outcome == 'failure' || steps.update.outcome == 'failure' || (steps.check-changes.outputs.changes == 'true' && steps.commit.outcome == 'failure')
97+
run: |
98+
ERROR_MSG="Update baselines failed"
99+
100+
if [[ "${{ steps.build.outcome }}" == "failure" ]]; then
101+
ERROR_MSG="$ERROR_MSG: Build script failed"
102+
elif [[ "${{ steps.update.outcome }}" == "failure" ]]; then
103+
ERROR_MSG="$ERROR_MSG: Update baselines script failed"
104+
elif [[ "${{ steps.commit.outcome }}" == "failure" ]]; then
105+
ERROR_MSG="$ERROR_MSG: Failed to commit or push changes"
106+
fi
107+
108+
gh pr comment ${{ github.event.inputs.pr_number }} \
109+
--body "$ERROR_MSG"
110+
env:
111+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.vsts-ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,7 @@ extends:
284284
publishUsingPipelines: true
285285
publishAssetsImmediately: true
286286
isAssetlessBuild: true
287+
repositoryAlias: self
287288
pool:
288289
name: $(DncEngInternalBuildPool)
289290
image: 1es-windows-2022

Directory.Build.props

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the MIT license. See License.txt in the project root for full license information. -->
21
<!-- Platform needs to be set with TreatAsLocalProperty since it is a global property and cannot be overridden otherwise. -->
32
<Project TreatAsLocalProperty="Platform">
43

Directory.Build.targets

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
<?xml version="1.0" encoding="utf-8"?>
2-
<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the MIT license. See License.txt in the project root for full license information. -->
31
<Project>
2+
43
<PropertyGroup>
54
<!--
65
Disable nullable warnings when targeting anything other than our supported .NET core version(s).
@@ -88,7 +87,7 @@
8887
<PackageDescription>
8988
$(PackageDescription)
9089

91-
The source code included in this package is subject to arbitrary changes in future versions.
90+
The source code included in this package is subject to arbitrary changes in future versions.
9291
Updating a reference to this package to a newer version of the package may require changes in the referencing project.
9392
No compatibility guarantees are provided.
9493
</PackageDescription>

OverrideTest.targets

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
<?xml version="1.0" encoding="utf-8"?>
2-
<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the MIT license. See License.txt in the project root for full license information. -->
31
<Project>
4-
<Target Name="Test" DependsOnTargets="TestAsTool"
5-
Condition="'$(IsUnitTestProject)' == 'true' or '$(IsPerformanceTestProject)' == 'true'"/>
2+
3+
<Target Name="Test"
4+
DependsOnTargets="TestAsTool"
5+
Condition="'$(IsUnitTestProject)' == 'true' or '$(IsPerformanceTestProject)' == 'true'" />
66

77
</Project>

eng/Version.Details.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Dependencies>
3-
<Source Uri="https://github.com/dotnet/dotnet" Mapping="sdk" Sha="7ac1ca67bb1fb8a381c1c94a9f82a97725f0ccf3" BarId="281128" />
3+
<Source Uri="https://github.com/dotnet/dotnet" Mapping="sdk" Sha="7f2a07b481a3d24677ebcf6a45e7e27c8ff95a4e" BarId="279809" />
44
<ProductDependencies>
55
<Dependency Name="Microsoft.TemplateEngine.Abstractions" Version="10.0.100-rc.2.25427.104">
66
<Uri>https://github.com/dotnet/dotnet</Uri>

0 commit comments

Comments
 (0)