Skip to content

Commit

Permalink
Install the PowerShellCore from appveyor artifacts and Enable OneGet …
Browse files Browse the repository at this point in the history
…daily run.
  • Loading branch information
jianyunt committed Nov 30, 2016
1 parent 557e510 commit af81a51
Showing 1 changed file with 18 additions and 6 deletions.
24 changes: 18 additions & 6 deletions Test/run-tests.ps1
Expand Up @@ -207,15 +207,27 @@ if ($testframework -eq "coreclr")

If($script:IsWindows)
{
Install-PackageProvider PSL -Force -verbose
$powershellCore = (Get-Package -provider PSL -name PowerShell -ErrorAction SilentlyContinue)
if ($powershellCore)
if($env:APPVEYOR_SCHEDULED_BUILD -eq 'True')
{
Write-Warning ("PowerShell already installed" -f $powershellCore.Name)
# for the daily run, we need to install PowerShellCore from github.com/powershell/powershell appveryor artifacts

$powershellMSIPackage = Get-PowerShellCoreBuild -Verbose

Write-Verbose $powershellMSIPackage
$powershellCore = Install-Package $powershellMSIPackage -provider msi -verbose -force
}
else
{
$powershellCore = Install-Package PowerShell -Provider PSL -Force -verbose
{
Install-PackageProvider PSL -Force -verbose
$powershellCore = (Get-Package -provider PSL -name PowerShell -ErrorAction SilentlyContinue)
if ($powershellCore)
{
Write-Warning ("PowerShell already installed" -f $powershellCore.Name)
}
else
{
$powershellCore = Install-Package PowerShell -Provider PSL -Force -verbose
}
}

$powershellVersion = $powershellCore.Version
Expand Down

0 comments on commit af81a51

Please sign in to comment.