Skip to content

Commit

Permalink
Fix broken travis.ps1 logic (PowerShell#2739)
Browse files Browse the repository at this point in the history
  • Loading branch information
vors authored and daxian-dbw committed Nov 21, 2016
1 parent bfd6d65 commit 172b223
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions tools/travis.ps1
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
Import-Module $PSScriptRoot/../build.psm1 -Force

$isPR = $env:TRAVIS_PULL_REQUEST -eq 'true'
$isCron = $env:TRAVIS_EVENT_TYPE -eq 'cron'
# https://docs.travis-ci.com/user/environment-variables/
# TRAVIS_EVENT_TYPE: Indicates how the build was triggered.
# One of push, pull_request, api, cron.
$isPR = $env:TRAVIS_EVENT_TYPE -eq 'pull_request'
$isFullBuild = $env:TRAVIS_EVENT_TYPE -eq 'cron' -or $env:TRAVIS_EVENT_TYPE -eq 'api'

Write-Host -Foreground Green "Executing travis.ps1 `$isPR='$isPr' `$isFullBuild='$isFullBuild'"

Start-PSBootstrap -Package:(-not $isPr)
$output = Split-Path -Parent (Get-PSOutput -Options (New-PSOptions -Publish))
Start-PSBuild -CrossGen -PSModuleRestore

$pesterParam = @{ 'binDir' = $output }

if ($cron) {
# daily builds
if ($isFullBuild) {
$pesterParam['Tag'] = @('CI','Feature','Scenario')
$pesterParam['ExcludeTag'] = @()
} else {
Expand Down

0 comments on commit 172b223

Please sign in to comment.