Add SkipRoslynAnalyzers parameter to Start-PSBuild (#15640)

This commit is contained in:
xtqqczze 2021-07-07 04:50:35 +01:00 committed by GitHub
parent 8dcd5a2e1c
commit 3a61483470
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -307,7 +307,8 @@ function Start-PSBuild {
[ValidateNotNullOrEmpty()]
[string]$ReleaseTag,
[switch]$Detailed,
[switch]$InteractiveAuth
[switch]$InteractiveAuth,
[switch]$SkipRoslynAnalyzers
)
if ($ReleaseTag -and $ReleaseTag -notmatch "^v\d+\.\d+\.\d+(-(preview|rc)(\.\d{1,2})?)?$") {
@ -453,6 +454,10 @@ Fix steps:
$Arguments += "/property:ReleaseTag=$ReleaseTagToUse"
}
if ($SkipRoslynAnalyzers) {
$Arguments += "/property:RunAnalyzersDuringBuild=false"
}
# handle Restore
Restore-PSPackage -Options $Options -Force:$Restore -InteractiveAuth:$InteractiveAuth