Skip to content

Commit 118e0b2

Browse files
committed
Modified logic to not build full on non-Windows
Add additional verbose statements for debugging
1 parent e9c8175 commit 118e0b2

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

appveyor.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,14 @@ install:
3232
3333
build_script:
3434
- ps: |
35-
Set-Location $env:APPVEYOR_BUILD_FOLDER
36-
./build.ps1 -Documentation
37-
if ( $env:PSVersion -eq "4" ) { # On WMF4: Also build for v3 to check it builds at least since we do not have a WMF3 image
38-
./build.ps1 -Configuration "$env:BuildConfiguration" -PSVersion 3 -Framework full
35+
if ( $env:PowerShellEdition -eq 'WindowsPowerShell' ) {
36+
Set-Location $env:APPVEYOR_BUILD_FOLDER
37+
./build.ps1 -Documentation
38+
if ( $env:PSVersion -eq "4" ) { # On WMF4: Also build for v3 to check it builds at least since we do not have a WMF3 image
39+
./build.ps1 -Configuration "$env:BuildConfiguration" -PSVersion 3 -Framework full
40+
}
41+
./build.ps1 -Configuration "$env:BuildConfiguration" -PSVersion "$env:PSVersion" -Framework full
3942
}
40-
./build.ps1 -Configuration "$env:BuildConfiguration" -PSVersion "$env:PSVersion" -Framework full
4143
- pwsh: |
4244
if ($env:PowerShellEdition -eq 'PowerShellCore') {
4345
Set-Location $env:APPVEYOR_BUILD_FOLDER
@@ -58,4 +60,4 @@ test_script:
5860
5961
# Upload the project along with test results as a zip archive
6062
on_finish:
61-
- ps: Import-Module "${env:BuildConfiguration}\tools\appveyor.psm1"; Invoke-AppveyorFinish
63+
- ps: Import-Module "${env:APPVEYOR_BUILD_FOLDER}\tools\appveyor.psm1"; Invoke-AppveyorFinish

tools/appveyor.psm1

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ function Invoke-AppveyorTest {
5050
$CheckoutPath
5151
)
5252

53+
Write-Verbose -Verbose ("Running tests on PowerShell version " + $PSVersionTable.PSVersion)
54+
5355
$modulePath = $env:PSModulePath.Split([System.IO.Path]::PathSeparator) | Where-Object { Test-Path $_} | Select-Object -First 1
5456
Copy-Item "${CheckoutPath}\out\PSScriptAnalyzer" "$modulePath\" -Recurse -Force
5557
$testResultsFile = ".\TestResults.xml"

0 commit comments

Comments
 (0)