Skip to content

Commit 668c6c9

Browse files
dotnet-maestro[bot]SimonZhao888ericstj
authored
[main] Source code updates from dotnet/dotnet (#51143)
Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com> Co-authored-by: SimonZhao888 <133954995+SimonZhao888@users.noreply.github.com> Co-authored-by: Eric St. John <ericstj@microsoft.com>
1 parent c1c8101 commit 668c6c9

File tree

18 files changed

+485
-442
lines changed

18 files changed

+485
-442
lines changed

Directory.Build.targets

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
<ItemGroup Condition="$(MicrosoftAspNetCoreAppRefPackageVersion.StartsWith('$(_TargetFrameworkVersionWithoutV)'))">
7373
<KnownFrameworkReference Update="Microsoft.AspNetCore.App">
7474
<LatestRuntimeFrameworkVersion>$(MicrosoftAspNetCoreAppRefPackageVersion)</LatestRuntimeFrameworkVersion>
75-
<RuntimePackRuntimeIdentifiers>${SupportedRuntimeIdentifiers}</RuntimePackRuntimeIdentifiers>
75+
<RuntimePackRuntimeIdentifiers>$(SupportedRuntimeIdentifiers)</RuntimePackRuntimeIdentifiers>
7676
<TargetingPackVersion>$(MicrosoftAspNetCoreAppRefPackageVersion)</TargetingPackVersion>
7777
<DefaultRuntimeFrameworkVersion>$(MicrosoftAspNetCoreAppRefPackageVersion)</DefaultRuntimeFrameworkVersion>
7878
</KnownFrameworkReference>

eng/Version.Details.props

Lines changed: 130 additions & 130 deletions
Large diffs are not rendered by default.

eng/Version.Details.xml

Lines changed: 261 additions & 261 deletions
Large diffs are not rendered by default.

eng/common/build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ runtime_source_feed=''
9292
runtime_source_feed_key=''
9393

9494
properties=()
95-
while [[ $# > 0 ]]; do
95+
while [[ $# -gt 0 ]]; do
9696
opt="$(echo "${1/#--/-}" | tr "[:upper:]" "[:lower:]")"
9797
case "$opt" in
9898
-help|-h)

eng/common/core-templates/job/job.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ parameters:
1919
# publishing defaults
2020
artifacts: ''
2121
enableMicrobuild: false
22+
enablePreviewMicrobuild: false
23+
microbuildPluginVersion: 'latest'
2224
enableMicrobuildForMacAndLinux: false
2325
microbuildUseESRP: true
2426
enablePublishBuildArtifacts: false
@@ -128,6 +130,8 @@ jobs:
128130
- template: /eng/common/core-templates/steps/install-microbuild.yml
129131
parameters:
130132
enableMicrobuild: ${{ parameters.enableMicrobuild }}
133+
enablePreviewMicrobuild: ${{ parameters.enablePreviewMicrobuild }}
134+
microbuildPluginVersion: ${{ parameters.microbuildPluginVersion }}
131135
enableMicrobuildForMacAndLinux: ${{ parameters.enableMicrobuildForMacAndLinux }}
132136
microbuildUseESRP: ${{ parameters.microbuildUseESRP }}
133137
continueOnError: ${{ parameters.continueOnError }}
@@ -153,6 +157,8 @@ jobs:
153157
- template: /eng/common/core-templates/steps/cleanup-microbuild.yml
154158
parameters:
155159
enableMicrobuild: ${{ parameters.enableMicrobuild }}
160+
enablePreviewMicrobuild: ${{ parameters.enablePreviewMicrobuild }}
161+
microbuildPluginVersion: ${{ parameters.microbuildPluginVersion }}
156162
enableMicrobuildForMacAndLinux: ${{ parameters.enableMicrobuildForMacAndLinux }}
157163
continueOnError: ${{ parameters.continueOnError }}
158164

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
parameters:
2+
- name: microbuildTaskInputs
3+
type: object
4+
default: {}
5+
6+
- name: microbuildEnv
7+
type: object
8+
default: {}
9+
10+
- name: enablePreviewMicrobuild
11+
type: boolean
12+
default: false
13+
14+
- name: condition
15+
type: string
16+
17+
- name: continueOnError
18+
type: boolean
19+
20+
steps:
21+
- ${{ if eq(parameters.enablePreviewMicrobuild, 'true') }}:
22+
- task: MicroBuildSigningPluginPreview@4
23+
displayName: Install Preview MicroBuild plugin (Windows)
24+
inputs: ${{ parameters.microbuildTaskInputs }}
25+
env: ${{ parameters.microbuildEnv }}
26+
continueOnError: ${{ parameters.continueOnError }}
27+
condition: ${{ parameters.condition }}
28+
- ${{ else }}:
29+
- task: MicroBuildSigningPlugin@4
30+
displayName: Install MicroBuild plugin (Windows)
31+
inputs: ${{ parameters.microbuildTaskInputs }}
32+
env: ${{ parameters.microbuildEnv }}
33+
continueOnError: ${{ parameters.continueOnError }}
34+
condition: ${{ parameters.condition }}

eng/common/core-templates/steps/install-microbuild.yml

Lines changed: 35 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ parameters:
44
# Enable install tasks for MicroBuild on Mac and Linux
55
# Will be ignored if 'enableMicrobuild' is false or 'Agent.Os' is 'Windows_NT'
66
enableMicrobuildForMacAndLinux: false
7+
# Enable preview version of MB signing plugin
8+
enablePreviewMicrobuild: false
79
# Determines whether the ESRP service connection information should be passed to the signing plugin.
810
# This overlaps with _SignType to some degree. We only need the service connection for real signing.
911
# It's important that the service connection not be passed to the MicroBuildSigningPlugin task in this place.
@@ -14,6 +16,8 @@ parameters:
1416
# Location of the MicroBuild output folder
1517
# NOTE: There's something that relies on this being in the "default" source directory for tasks such as Signing to work properly.
1618
microBuildOutputFolder: '$(Build.SourcesDirectory)'
19+
# Microbuild version
20+
microbuildPluginVersion: 'latest'
1721

1822
continueOnError: false
1923

@@ -51,41 +55,45 @@ steps:
5155
# YAML expansion, and Windows vs. Linux/Mac uses different service connections. However,
5256
# we can avoid including the MB install step if not enabled at all. This avoids a bunch of
5357
# extra pipeline authorizations, since most pipelines do not sign on non-Windows.
54-
- task: MicroBuildSigningPlugin@4
55-
displayName: Install MicroBuild plugin (Windows)
56-
inputs:
57-
signType: $(_SignType)
58-
zipSources: false
59-
feedSource: https://dnceng.pkgs.visualstudio.com/_packaging/MicroBuildToolset/nuget/v3/index.json
60-
${{ if eq(parameters.microbuildUseESRP, true) }}:
61-
ConnectedServiceName: 'MicroBuild Signing Task (DevDiv)'
62-
${{ if eq(variables['System.TeamProject'], 'DevDiv') }}:
63-
ConnectedPMEServiceName: 6cc74545-d7b9-4050-9dfa-ebefcc8961ea
64-
${{ else }}:
65-
ConnectedPMEServiceName: 248d384a-b39b-46e3-8ad5-c2c210d5e7ca
66-
env:
67-
TeamName: $(_TeamName)
68-
MicroBuildOutputFolderOverride: ${{ parameters.microBuildOutputFolder }}
69-
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
70-
continueOnError: ${{ parameters.continueOnError }}
71-
condition: and(succeeded(), eq(variables['Agent.Os'], 'Windows_NT'), in(variables['_SignType'], 'real', 'test'))
72-
73-
- ${{ if eq(parameters.enableMicrobuildForMacAndLinux, true) }}:
74-
- task: MicroBuildSigningPlugin@4
75-
displayName: Install MicroBuild plugin (non-Windows)
76-
inputs:
58+
- template: /eng/common/core-templates/steps/install-microbuild-impl.yml@self
59+
parameters:
60+
enablePreviewMicrobuild: ${{ parameters.enablePreviewMicrobuild }}
61+
microbuildTaskInputs:
7762
signType: $(_SignType)
7863
zipSources: false
7964
feedSource: https://dnceng.pkgs.visualstudio.com/_packaging/MicroBuildToolset/nuget/v3/index.json
65+
version: ${{ parameters.microbuildPluginVersion }}
8066
${{ if eq(parameters.microbuildUseESRP, true) }}:
8167
ConnectedServiceName: 'MicroBuild Signing Task (DevDiv)'
8268
${{ if eq(variables['System.TeamProject'], 'DevDiv') }}:
83-
ConnectedPMEServiceName: beb8cb23-b303-4c95-ab26-9e44bc958d39
69+
ConnectedPMEServiceName: 6cc74545-d7b9-4050-9dfa-ebefcc8961ea
8470
${{ else }}:
85-
ConnectedPMEServiceName: c24de2a5-cc7a-493d-95e4-8e5ff5cad2bc
86-
env:
71+
ConnectedPMEServiceName: 248d384a-b39b-46e3-8ad5-c2c210d5e7ca
72+
microbuildEnv:
8773
TeamName: $(_TeamName)
8874
MicroBuildOutputFolderOverride: ${{ parameters.microBuildOutputFolder }}
8975
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
9076
continueOnError: ${{ parameters.continueOnError }}
91-
condition: and(succeeded(), ne(variables['Agent.Os'], 'Windows_NT'), eq(variables['_SignType'], 'real'))
77+
condition: and(succeeded(), eq(variables['Agent.Os'], 'Windows_NT'), in(variables['_SignType'], 'real', 'test'))
78+
79+
- ${{ if eq(parameters.enableMicrobuildForMacAndLinux, true) }}:
80+
- template: /eng/common/core-templates/steps/install-microbuild-impl.yml@self
81+
parameters:
82+
enablePreviewMicrobuild: ${{ parameters.enablePreviewMicrobuild }}
83+
microbuildTaskInputs:
84+
signType: $(_SignType)
85+
zipSources: false
86+
feedSource: https://dnceng.pkgs.visualstudio.com/_packaging/MicroBuildToolset/nuget/v3/index.json
87+
version: ${{ parameters.microbuildPluginVersion }}
88+
${{ if eq(parameters.microbuildUseESRP, true) }}:
89+
ConnectedServiceName: 'MicroBuild Signing Task (DevDiv)'
90+
${{ if eq(variables['System.TeamProject'], 'DevDiv') }}:
91+
ConnectedPMEServiceName: beb8cb23-b303-4c95-ab26-9e44bc958d39
92+
${{ else }}:
93+
ConnectedPMEServiceName: c24de2a5-cc7a-493d-95e4-8e5ff5cad2bc
94+
microbuildEnv:
95+
TeamName: $(_TeamName)
96+
MicroBuildOutputFolderOverride: ${{ parameters.microBuildOutputFolder }}
97+
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
98+
continueOnError: ${{ parameters.continueOnError }}
99+
condition: and(succeeded(), ne(variables['Agent.Os'], 'Windows_NT'), eq(variables['_SignType'], 'real'))

eng/common/darc-init.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ darcVersion=''
55
versionEndpoint='https://maestro.dot.net/api/assets/darc-version?api-version=2020-02-20'
66
verbosity='minimal'
77

8-
while [[ $# > 0 ]]; do
8+
while [[ $# -gt 0 ]]; do
99
opt="$(echo "$1" | tr "[:upper:]" "[:lower:]")"
1010
case "$opt" in
1111
--darcversion)

eng/common/dotnet-install.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ architecture=''
1818
runtime='dotnet'
1919
runtimeSourceFeed=''
2020
runtimeSourceFeedKey=''
21-
while [[ $# > 0 ]]; do
21+
while [[ $# -gt 0 ]]; do
2222
opt="$(echo "$1" | tr "[:upper:]" "[:lower:]")"
2323
case "$opt" in
2424
-version|-v)

eng/common/dotnet.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ source $scriptroot/tools.sh
1919
InitializeDotNetCli true # install
2020

2121
# Invoke acquired SDK with args if they are provided
22-
if [[ $# > 0 ]]; then
22+
if [[ $# -gt 0 ]]; then
2323
__dotnetDir=${_InitializeDotNetCli}
2424
dotnetPath=${__dotnetDir}/dotnet
2525
${dotnetPath} "$@"

0 commit comments

Comments
 (0)