Disable signing of non-shipping packages
Also clean up how $(SignCoreSdk) is set so that `build -sign` does so and allows a full dry run locally.
This commit is contained in:
parent
7522ad768a
commit
04dd2332ff
3 changed files with 28 additions and 6 deletions
16
eng/Signing.props
Normal file
16
eng/Signing.props
Normal file
|
@ -0,0 +1,16 @@
|
|||
<Project>
|
||||
|
||||
<ItemGroup>
|
||||
<!-- Do not sign non-shipping packages -->
|
||||
<ItemsToSign Remove="$(ArtifactsNonShippingPackagesDir)**\*.nupkg" />
|
||||
</ItemGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<!--
|
||||
Signing of shipping artifacts (layout, msi, bundle) are handled separately.
|
||||
It is therefore expected that above removal can yield an empty set.
|
||||
-->
|
||||
<AllowEmptySignList>true</AllowEmptySignList>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
|
@ -27,12 +27,12 @@ IF /I "%Architecture:~0,3%"=="ARM" (
|
|||
ECHO ##vso[task.setvariable variable=TestParameter]
|
||||
ECHO ##vso[task.setvariable variable=RunTests]false
|
||||
|
||||
ECHO ##vso[task.setvariable variable=AdditionalBuildParameters]/p:SignCoreSdk=true /p:DotNetSignType=%SignType%
|
||||
|
||||
) ELSE (
|
||||
ECHO NOT ARM
|
||||
ECHO ##vso[task.setvariable variable=TestParameter]-test
|
||||
ECHO ##vso[task.setvariable variable=RunTests]true
|
||||
|
||||
ECHO ##vso[task.setvariable variable=AdditionalBuildParameters]-sign /p:SignCoreSdk=true /p:DotNetSignType=%SignType%
|
||||
)
|
||||
)
|
||||
|
||||
ECHO ##vso[task.setvariable variable=AdditionalBuildParameters]-sign /p:DotNetSignType=%SignType%
|
||||
|
|
|
@ -7,15 +7,21 @@
|
|||
param(
|
||||
[string]$Configuration="Debug",
|
||||
[string]$Architecture="x64",
|
||||
[switch]$Sign=$false,
|
||||
[Parameter(ValueFromRemainingArguments=$true)][String[]]$ExtraParameters
|
||||
)
|
||||
|
||||
$RepoRoot = "$PSScriptRoot"
|
||||
|
||||
$ArchitectureParam="/p:Architecture=$Architecture"
|
||||
$ConfigurationParam="-configuration $Configuration"
|
||||
$Parameters = "/p:Architecture=$Architecture"
|
||||
$Parameters = "$Parameters -configuration $Configuration"
|
||||
|
||||
if ($Sign) {
|
||||
$Parameters = "$Parameters -sign /p:SignCoreSdk=true"
|
||||
}
|
||||
|
||||
try {
|
||||
$ExpressionToInvoke = "$RepoRoot\eng\common\build.ps1 -restore -build $ConfigurationParam $ArchitectureParam $ExtraParameters"
|
||||
$ExpressionToInvoke = "$RepoRoot\eng\common\build.ps1 -restore -build $Parameters $ExtraParameters"
|
||||
Write-Host "Invoking expression: $ExpressionToInvoke"
|
||||
Invoke-Expression $ExpressionToInvoke
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue