mirror of
https://github.com/PowerShell/PowerShell.git
synced 2024-11-23 09:43:57 +08:00
Add archive with test content to AppVeyor artifacts for daily builds.
The change adds Compress-TestContent cmdlet to build.psm1 so that it can compress the powershell test content. This is done only for daily builds.
This commit is contained in:
parent
124a59b8a8
commit
f31d4a5ac2
13
build.psm1
13
build.psm1
@ -370,6 +370,19 @@ cmd.exe /C cd /d "$location" "&" "$($vcVarsPath)\vcvarsall.bat" "$NativeHostArch
|
||||
}
|
||||
}
|
||||
|
||||
function Compress-TestContent {
|
||||
[CmdletBinding()]
|
||||
param(
|
||||
$Destination
|
||||
)
|
||||
|
||||
$powerShellTestRoot = Join-Path $PSScriptRoot 'test\powershell'
|
||||
Add-Type -AssemblyName System.IO.Compression.FileSystem
|
||||
|
||||
$resolvedPath = $ExecutionContext.SessionState.Path.GetUnresolvedProviderPathFromPSPath($Destination)
|
||||
[System.IO.Compression.ZipFile]::CreateFromDirectory($powerShellTestRoot, $resolvedPath)
|
||||
}
|
||||
|
||||
function New-PSOptions {
|
||||
[CmdletBinding()]
|
||||
param(
|
||||
|
@ -248,6 +248,14 @@ function Invoke-AppveyorFinish
|
||||
$artifacts.Add($zipFilePath)
|
||||
$artifacts.Add($zipFileFullPath)
|
||||
|
||||
# Create archive for test content
|
||||
if(Test-DailyBuild)
|
||||
{
|
||||
$zipTestContentPath = Join-Path $pwd 'tests.zip'
|
||||
Compress-TestContent -Destination $zipTestContentPath
|
||||
$artifacts.Add($zipTestContentPath)
|
||||
}
|
||||
|
||||
if ($env:APPVEYOR_REPO_TAG_NAME)
|
||||
{
|
||||
# ignore the first part of semver, use the preview part
|
||||
|
Loading…
Reference in New Issue
Block a user