From 1491d4c98537b0fcd21da008afc457d596fe16f3 Mon Sep 17 00:00:00 2001 From: Christoph Bergmeister Date: Thu, 22 Aug 2019 20:54:27 +0100 Subject: [PATCH 1/6] try fix appveyor ubuntu build --- tools/appveyor.psm1 | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/appveyor.psm1 b/tools/appveyor.psm1 index 65dd71304..60e22a4de 100644 --- a/tools/appveyor.psm1 +++ b/tools/appveyor.psm1 @@ -36,6 +36,7 @@ function Invoke-AppVeyorInstall { Write-Verbose "& $buildScriptDir/build.ps1 -bootstrap" $buildScriptDir = (Resolve-Path "$PSScriptRoot/..").Path & "$buildScriptDir/build.ps1" -bootstrap + $GLOBAL:LASTEXITCODE = $LASTEXITCODE = 0 # needed to avoid a premature abortion of the ApVeyor Ubuntu build } # Implements AppVeyor 'test_script' step From 4c360ada09d60ef66ddb9dff14a08f5602668faa Mon Sep 17 00:00:00 2001 From: Christoph Bergmeister Date: Thu, 22 Aug 2019 20:54:56 +0100 Subject: [PATCH 2/6] temporarily enable only ubuntu --- appveyor.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index d3f02b1be..6744d655b 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -3,13 +3,13 @@ environment: BuildConfiguration: Release DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true # For faster CI builds matrix: - - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 - PowerShellEdition: PowerShellCore - - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 - PowerShellEdition: WindowsPowerShell - - APPVEYOR_BUILD_WORKER_IMAGE: WMF 4 - PowerShellEdition: WindowsPowerShell - PSVersion: 4 + # - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 + # PowerShellEdition: PowerShellCore + # - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 + # PowerShellEdition: WindowsPowerShell + # - APPVEYOR_BUILD_WORKER_IMAGE: WMF 4 + # PowerShellEdition: WindowsPowerShell + # PSVersion: 4 - APPVEYOR_BUILD_WORKER_IMAGE: Ubuntu PowerShellEdition: PowerShellCore From 225da8982bc867a2c250652e19e3d5951bec0dc6 Mon Sep 17 00:00:00 2001 From: Christoph Bergmeister Date: Thu, 22 Aug 2019 20:57:19 +0100 Subject: [PATCH 3/6] remove redundant linux customisation --- Tests/Engine/CustomizedRule.tests.ps1 | 8 -------- 1 file changed, 8 deletions(-) diff --git a/Tests/Engine/CustomizedRule.tests.ps1 b/Tests/Engine/CustomizedRule.tests.ps1 index 301586667..121655f12 100644 --- a/Tests/Engine/CustomizedRule.tests.ps1 +++ b/Tests/Engine/CustomizedRule.tests.ps1 @@ -97,10 +97,6 @@ Describe "Test importing correct customized rules" { It "will show the custom rules when given a glob" { # needs fixing for Linux $expectedNumRules = 4 - if ($IsLinux) - { - $expectedNumRules = 3 - } $customizedRulePath = Get-ScriptAnalyzerRule -CustomizedRulePath $directory\samplerule\samplerule* | Where-Object {$_.RuleName -match $measure} $customizedRulePath.Count | Should -Be $expectedNumRules } @@ -113,10 +109,6 @@ Describe "Test importing correct customized rules" { It "will show the custom rules when given glob with recurse switch" { # needs fixing for Linux $expectedNumRules = 5 - if ($IsLinux) - { - $expectedNumRules = 4 - } $customizedRulePath = Get-ScriptAnalyzerRule -RecurseCustomRulePath -CustomizedRulePath $directory\samplerule\samplerule* | Where-Object {$_.RuleName -eq $measure} $customizedRulePath.Count | Should -Be $expectedNumRules } From 9a5c636beceb5026ff6755e36793677640b0640a Mon Sep 17 00:00:00 2001 From: Christoph Bergmeister Date: Thu, 22 Aug 2019 21:01:37 +0100 Subject: [PATCH 4/6] fix compatibility analyser build --- PSCompatibilityCollector/build.ps1 | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/PSCompatibilityCollector/build.ps1 b/PSCompatibilityCollector/build.ps1 index d015d4453..ec028ee08 100644 --- a/PSCompatibilityCollector/build.ps1 +++ b/PSCompatibilityCollector/build.ps1 @@ -57,7 +57,15 @@ function Invoke-CrossCompatibilityModuleBuild Push-Location $script:BinModSrcDir try { - dotnet publish -f $Framework -c $Configuration + if ( Test-Path "$HOME/.dotnet/dotnet" ) + { + $dotnet = "$HOME/.dotnet/dotnet" + } + else + { + $dotnet = "dotnet" + } + & $dotnet publish --framework $Framework --configuration $Configuration } finally { From 8224843f27892d62837c8ecb53f8028c45af9b8f Mon Sep 17 00:00:00 2001 From: Christoph Bergmeister Date: Thu, 22 Aug 2019 21:07:54 +0100 Subject: [PATCH 5/6] final tweak to make it ready for PR --- appveyor.yml | 14 +++++++------- tools/appveyor.psm1 | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 6744d655b..d3f02b1be 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -3,13 +3,13 @@ environment: BuildConfiguration: Release DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true # For faster CI builds matrix: - # - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 - # PowerShellEdition: PowerShellCore - # - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 - # PowerShellEdition: WindowsPowerShell - # - APPVEYOR_BUILD_WORKER_IMAGE: WMF 4 - # PowerShellEdition: WindowsPowerShell - # PSVersion: 4 + - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 + PowerShellEdition: PowerShellCore + - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 + PowerShellEdition: WindowsPowerShell + - APPVEYOR_BUILD_WORKER_IMAGE: WMF 4 + PowerShellEdition: WindowsPowerShell + PSVersion: 4 - APPVEYOR_BUILD_WORKER_IMAGE: Ubuntu PowerShellEdition: PowerShellCore diff --git a/tools/appveyor.psm1 b/tools/appveyor.psm1 index 60e22a4de..10f127202 100644 --- a/tools/appveyor.psm1 +++ b/tools/appveyor.psm1 @@ -36,7 +36,7 @@ function Invoke-AppVeyorInstall { Write-Verbose "& $buildScriptDir/build.ps1 -bootstrap" $buildScriptDir = (Resolve-Path "$PSScriptRoot/..").Path & "$buildScriptDir/build.ps1" -bootstrap - $GLOBAL:LASTEXITCODE = $LASTEXITCODE = 0 # needed to avoid a premature abortion of the ApVeyor Ubuntu build + $Global:LASTEXITCODE = $LASTEXITCODE = 0 # needed to avoid a premature abortion of the ApVeyor Ubuntu build } # Implements AppVeyor 'test_script' step From 59d1e6fec2530f8f9d5f3c398cb8f2c8c8757ad0 Mon Sep 17 00:00:00 2001 From: "Christoph Bergmeister [MVP]" Date: Fri, 23 Aug 2019 08:09:45 +0100 Subject: [PATCH 6/6] Update tools/appveyor.psm1 Co-Authored-By: Robert Holt --- tools/appveyor.psm1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/appveyor.psm1 b/tools/appveyor.psm1 index 10f127202..1614eba22 100644 --- a/tools/appveyor.psm1 +++ b/tools/appveyor.psm1 @@ -36,7 +36,7 @@ function Invoke-AppVeyorInstall { Write-Verbose "& $buildScriptDir/build.ps1 -bootstrap" $buildScriptDir = (Resolve-Path "$PSScriptRoot/..").Path & "$buildScriptDir/build.ps1" -bootstrap - $Global:LASTEXITCODE = $LASTEXITCODE = 0 # needed to avoid a premature abortion of the ApVeyor Ubuntu build + $Global:LASTEXITCODE = $LASTEXITCODE = 0 # needed to avoid a premature abortion of the AppVeyor Ubuntu build } # Implements AppVeyor 'test_script' step