Don't try to sign installers for ARM (since they aren't built)

This commit is contained in:
Daniel Plaisted 2018-12-11 14:24:22 -08:00
parent a346e17c76
commit d2a4791929
2 changed files with 25 additions and 19 deletions

View file

@ -35,13 +35,14 @@ phases:
displayName: Show TestParameter
- script: 'echo RunTests: $(RunTests)'
displayName: Show RunTests
- script: 'echo AdditionalBuildParameters: $(AdditionalBuildParameters)'
displayName: Show AdditionalBuildParameters
- ${{ if eq(parameters.agentOs, 'Windows_NT') }}:
- script: build.cmd
$(TestParameter)
-pack -publish
-Configuration $(BuildConfig)
-Architecture $(BuildArchitecture)
-sign /p:SignCoreSdk=true /p:DotNetSignType=$(SignType)
$(AdditionalBuildParameters)
displayName: Build
env:

View file

@ -5,24 +5,6 @@ setlocal
set Architecture=%1
set Config=%2
IF /I "%Architecture:~0,3%"=="ARM" (
ECHO ARM
ECHO ##vso[task.setvariable variable=TestParameter]
ECHO ##vso[task.setvariable variable=RunTests]false
) ELSE (
ECHO NOT ARM
ECHO ##vso[task.setvariable variable=TestParameter]-test
ECHO ##vso[task.setvariable variable=RunTests]true
)
if /I "%SYSTEM_TEAMPROJECT%" == "Public" (
ECHO Public CI
ECHO ##vso[task.setvariable variable=SignType]test
) ELSE (
ECHO Not public CI
ECHO ##vso[task.setvariable variable=SignType]real
)
if "%AdditionalBuildParameters%" == "$(_AdditionalBuildParameters)" (
REM Prevent the literal "$(_AdditionalBuildParameters)" to be passed to the build script
ECHO Setting AdditionalBuildParameters to empty
@ -31,3 +13,26 @@ if "%AdditionalBuildParameters%" == "$(_AdditionalBuildParameters)" (
ECHO AdditionalBuildParameters is already set to: %AdditionalBuildParameters%
)
if /I "%SYSTEM_TEAMPROJECT%" == "Public" (
ECHO Public CI
SET SignType=test
) ELSE (
ECHO Not public CI
SET SignType=real
)
ECHO ##vso[task.setvariable variable=SignType]%SignType%
IF /I "%Architecture:~0,3%"=="ARM" (
ECHO 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%
)