Skip to content

Commit 5cd3065

Browse files
bergmeisterrjmholt
authored andcommitted
Fix Ubuntu Appveyor build (#1320)
* try fix appveyor ubuntu build * temporarily enable only ubuntu * remove redundant linux customisation * fix compatibility analyser build * final tweak to make it ready for PR * Update tools/appveyor.psm1 Co-Authored-By: Robert Holt <[email protected]>
1 parent 3351367 commit 5cd3065

File tree

3 files changed

+10
-9
lines changed

3 files changed

+10
-9
lines changed

PSCompatibilityCollector/build.ps1

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,15 @@ function Invoke-CrossCompatibilityModuleBuild
5757
Push-Location $script:BinModSrcDir
5858
try
5959
{
60-
dotnet publish -f $Framework -c $Configuration
60+
if ( Test-Path "$HOME/.dotnet/dotnet" )
61+
{
62+
$dotnet = "$HOME/.dotnet/dotnet"
63+
}
64+
else
65+
{
66+
$dotnet = "dotnet"
67+
}
68+
& $dotnet publish --framework $Framework --configuration $Configuration
6169
}
6270
finally
6371
{

Tests/Engine/CustomizedRule.tests.ps1

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -97,10 +97,6 @@ Describe "Test importing correct customized rules" {
9797
It "will show the custom rules when given a glob" {
9898
# needs fixing for Linux
9999
$expectedNumRules = 4
100-
if ($IsLinux)
101-
{
102-
$expectedNumRules = 3
103-
}
104100
$customizedRulePath = Get-ScriptAnalyzerRule -CustomizedRulePath $directory\samplerule\samplerule* | Where-Object {$_.RuleName -match $measure}
105101
$customizedRulePath.Count | Should -Be $expectedNumRules
106102
}
@@ -113,10 +109,6 @@ Describe "Test importing correct customized rules" {
113109
It "will show the custom rules when given glob with recurse switch" {
114110
# needs fixing for Linux
115111
$expectedNumRules = 5
116-
if ($IsLinux)
117-
{
118-
$expectedNumRules = 4
119-
}
120112
$customizedRulePath = Get-ScriptAnalyzerRule -RecurseCustomRulePath -CustomizedRulePath $directory\samplerule\samplerule* | Where-Object {$_.RuleName -eq $measure}
121113
$customizedRulePath.Count | Should -Be $expectedNumRules
122114
}

tools/appveyor.psm1

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ function Invoke-AppVeyorInstall {
3636
Write-Verbose "& $buildScriptDir/build.ps1 -bootstrap"
3737
$buildScriptDir = (Resolve-Path "$PSScriptRoot/..").Path
3838
& "$buildScriptDir/build.ps1" -bootstrap
39+
$Global:LASTEXITCODE = $LASTEXITCODE = 0 # needed to avoid a premature abortion of the AppVeyor Ubuntu build
3940
}
4041

4142
# Implements AppVeyor 'test_script' step

0 commit comments

Comments
 (0)