-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpost-build.ps1
42 lines (31 loc) · 1.14 KB
/
post-build.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
34
35
36
37
38
39
40
41
42
$target = "target"
$exe = "blackout.exe"
$echo = "echo.exe"
$configs = @("debug", "release")
$deploy = "deploy"
$installer = "install.ps1"
$uninstaller = "uninstall.ps1"
foreach ($config in $configs)
{
$tc = Join-Path -Path $target -ChildPath $config
if (Test-Path -Path $tc -PathType Container)
{
$dd = Join-Path -Path $deploy -ChildPath $config
if (-not (Test-Path -Path $dd -PathType Container))
{
New-Item -Path $dd -ItemType Directory | Out-Null
}
$sf = Join-Path -Path $tc -ChildPath $exe
$df = Join-Path -Path $dd -ChildPath $exe
Copy-Item -Path $sf -Destination $df -Force
$se = Join-Path -Path $tc -ChildPath $echo
$de = Join-Path -Path $dd -ChildPath $echo
Copy-Item -Path $se -Destination $de -Force
$si = Join-Path "src/installer" -ChildPath $installer
$di = Join-Path -Path $dd -ChildPath $installer
Copy-Item -Path $si -Destination $di -Force
$su = Join-Path "src/installer" -ChildPath $uninstaller
$du = Join-Path $dd -ChildPath $uninstaller
Copy-Item -Path $su -Destination $du -Force
}
}