-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtest-nearest.ps1
More file actions
51 lines (45 loc) · 1.27 KB
/
test-nearest.ps1
File metadata and controls
51 lines (45 loc) · 1.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<#
.SYNOPSIS
Generated publish file for github.com/wgross dev workflow in 'dotnet-nearest'.
.PARAMETER Target
Specifies what to publish (optional)
.PARAMETER BuildConfiguration
Specifies publish BuildConfigurationuration (optional)
.PARAMETER Destination
Specifies publish destination (optional)
.PARAMETER FromPath
Specifies the path from where it is called (mandatory)
#>
param(
[Parameter(Position=0)]
[string]$Target,
[Parameter(Mandatory)]
[ValidateScript({$_|Test-Path -PathType Container})]
$FromPath
)
Import-Module -Name dotnet-files
Import-Module -Name dotnet-cli-test
# add meta data to the pipe object
filter add_test_script {
$_|Add-Member -PassThru -NotePropertyMembers @{
TestScript = $PSCommandPath
FromPath = $FromPath
}
}
# start build relative to the scripts directory
$PSScriptRoot|Push-Location
try {
# react to the publish target
switch($Target) {
default {
@(
"test/TreeStore.LiteDb.Test"
"test/TreeStore.Messaging.Test"
"test/TreeStore.Model.Test"
"test/TreeStore.PsModule.Test"
) | Get-DotNetProjectItem | Invoke-DotNetTest -SelectProperties
}
}
} finally {
Pop-Location
}