-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathCollectArtifacts.ps1
33 lines (27 loc) · 1.04 KB
/
CollectArtifacts.ps1
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
#Requires -Version 7.2
param(
[Parameter(Mandatory)]
[String] $Configuration,
[Parameter(Mandatory)]
[String] $TargetFramework,
[String] $OutputDir
)
if ([string]::IsNullOrEmpty($OutputDir)) {
$OutputDir = Join-Path 'publish' $Configuration $TargetFramework
}
$OutputPluginDir = Join-Path $OutputDir 'plugin'
if (!(Test-Path $OutputPluginDir)) {
New-Item -Path $OutputPluginDir -ItemType 'directory' | Out-Null
}
Get-ChildItem $(Join-Path 'Common\bin' $Configuration $TargetFramework '*.dll') | ForEach-Object -Process {
Copy-Item -Path $_.FullName -Destination $OutputDir
}
Get-ChildItem "Th*" -Directory | Where-Object Name -ne 'Th11Replay' | ForEach-Object -Process {
$Project = $_.Name
$Arguments = @{
Path = Join-Path $_.FullName 'bin' $Configuration $TargetFramework "ReimuPlugins.$Project.dll"
Destination = Join-Path $OutputPluginDir "ReimuPlugins.$Project.rpi"
}
Copy-Item @Arguments
}
Copy-Item -Path 'ManualGenerator\_build\html' -Destination $(Join-Path $OutputDir 'doc') -Recurse