Skip to content

Commit 1462e1b

Browse files
committed
Address PR feedback
Remove comment code change logic to use existing environment variable when building in VSTS Remove extraneous suppression of New-FileCatalog
1 parent 2bbd2d5 commit 1462e1b

File tree

3 files changed

+5
-21
lines changed

3 files changed

+5
-21
lines changed

build.ps1

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ END {
6969
if ( $Catalog ) {
7070
$buildArgs['Catalog'] = $true
7171
}
72-
Start-ScriptAnalyzerBuild @buildArgs # -All -Configuration $Configuration -Verbose:$verboseWanted
72+
Start-ScriptAnalyzerBuild @buildArgs
7373
}
7474
"BuildDocumentation" {
7575
Start-ScriptAnalyzerBuild -Documentation -Verbose:$Verbose

build.psm1

+4-6
Original file line numberDiff line numberDiff line change
@@ -275,11 +275,10 @@ function Start-ScriptAnalyzerBuild
275275
$framework,
276276
"--configuration",
277277
"$buildConfiguration"
278-
if ( $env:InVSTS ) {
278+
if ( $env:TF_BUILD ) {
279279
$dotnetArgs += "--output"
280280
$dotnetArgs += "${PSScriptRoot}\bin\${buildConfiguration}\${framework}"
281281
}
282-
# $buildOutput = & $script:DotnetExe build --framework $framework --configuration "$buildConfiguration" 2>&1
283282
$buildOutput = & $script:DotnetExe $dotnetArgs 2>&1
284283
if ( $LASTEXITCODE -ne 0 ) { throw "$buildOutput" }
285284
Write-Verbose -Verbose:$verboseWanted -message "$buildOutput"
@@ -295,7 +294,7 @@ function Start-ScriptAnalyzerBuild
295294

296295
Publish-File $itemsToCopyCommon $script:destinationDir
297296

298-
if ( $env:InVsts ) {
297+
if ( $env:TF_BUILD ) {
299298
$itemsToCopyBinaries = @(
300299
"$projectRoot\bin\${buildConfiguration}\${Framework}\Microsoft.Windows.PowerShell.ScriptAnalyzer.dll",
301300
"$projectRoot\bin\${buildConfiguration}\${Framework}\Microsoft.Windows.PowerShell.ScriptAnalyzer.BuiltinRules.dll"
@@ -315,7 +314,7 @@ function Start-ScriptAnalyzerBuild
315314
Publish-File $settingsFiles (Join-Path -Path $script:destinationDir -ChildPath Settings)
316315

317316
if ($framework -eq 'net452') {
318-
if ( $env:InVSTS ) {
317+
if ( $env:TF_BUILD ) {
319318
$nsoft = "$projectRoot\bin\${buildConfiguration}\${framework}\Newtonsoft.Json.dll"
320319
}
321320
else {
@@ -330,9 +329,8 @@ function Start-ScriptAnalyzerBuild
330329

331330
function New-Catalog
332331
{
333-
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseCompatibleCommands', '')]
334332
param ( [Parameter()]$Location )
335-
$newFileCatalog = Get-Command -ea silentlycontinue New-FileCatalog
333+
$newFileCatalog = Get-Command -ErrorAction SilentlyContinue New-FileCatalog
336334
if ($null -eq $newFileCatalog) {
337335
Write-Warning "New-FileCatalog not found, not creating catalog"
338336
return

tools/releaseBuild/AssemblySignConfig.xml

-14
Original file line numberDiff line numberDiff line change
@@ -40,18 +40,4 @@
4040
<file src="__INPATHROOT__\out\PSScriptAnalyzer\1.19.0\PSv3\Microsoft.Windows.PowerShell.ScriptAnalyzer.dll" signType="400" dest="__OUTPATHROOT__\PSScriptAnalyzer\1.19.0\PSv3\Microsoft.Windows.PowerShell.ScriptAnalyzer.dll" />
4141
<file src="__INPATHROOT__\out\PSScriptAnalyzer\1.19.0\PSv3\Microsoft.PowerShell.CrossCompatibility.dll" signType="400" dest="__OUTPATHROOT__\PSScriptAnalyzer\1.19.0\PSv3\Microsoft.PowerShell.CrossCompatibility.dll" />
4242
</job>
43-
<!--
44-
<job platform="" configuration="" dest="__OUTPATHROOT__\signed" jobname="PowerShell Compatibility Analyzer" approvers="vigarg;gstolt">
45-
<file src="__INPATHROOT__\out\PSCompatibilityCollector\PSCompatibilityCollector.psd1" signType="400" dest="__OUTPATHROOT__\PSCompatibilityCollector\PSCompatibilityCollector.psd1" />
46-
<file src="__INPATHROOT__\out\PSCompatibilityCollector\PSCompatibilityCollector.psm1" signType="400" dest="__OUTPATHROOT__\PSCompatibilityCollector\PSCompatibilityCollector.psm1" />
47-
</job>
48-
<job platform="" configuration="" dest="__OUTPATHROOT__\signed" jobname="PowerShell Compatibility Analyzer netstandard2.0 DLLs" approvers="vigarg;gstolt">
49-
<file src="__INPATHROOT__\out\PSCompatibilityCollector\netstandard2.0\Microsoft.PowerShell.CrossCompatibility.dll" signType="400" dest="__OUTPATHROOT__\PSCompatibilityCollector\netstandard2.0\Microsoft.PowerShell.CrossCompatibility.dll" />
50-
<file src="__INPATHROOT__\out\PSCompatibilityCollector\netstandard2.0\Newtonsoft.Json.dll" signType="400" dest="__OUTPATHROOT__\PSCompatibilityCollector\netstandard2.0\Newtonsoft.Json.dll" />
51-
</job>
52-
<job platform="" configuration="" dest="__OUTPATHROOT__\signed" jobname="PowerShell Compatibility Analyzer net452 DLLs" approvers="vigarg;gstolt">
53-
<file src="__INPATHROOT__\out\PSCompatibilityCollector\net452\Microsoft.PowerShell.CrossCompatibility.dll" signType="400" dest="__OUTPATHROOT__\PSCompatibilityCollector\net452\Microsoft.PowerShell.CrossCompatibility.dll" />
54-
<file src="__INPATHROOT__\out\PSCompatibilityCollector\net452\Newtonsoft.Json.dll" signType="400" dest="__OUTPATHROOT__\PSCompatibilityCollector\net452\Newtonsoft.Json.dll" />
55-
</job>
56-
-->
5743
</SignConfigXML>

0 commit comments

Comments
 (0)