forked from OrgEleCho/CurvaLauncher
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.ps1
26 lines (18 loc) · 803 Bytes
/
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
Write-Output "CurvaLauncher AutoBuild Script"
New-Item -ItemType Directory -Force "build" > $null
New-Item -ItemType Directory -Force "build/tmp" > $null
New-Item -ItemType Directory -Force "build/Plugins" > $null
Write-Output "Building app"
dotnet publish src/CurvaLauncher -c Release -o build -r win-x64 --self-contained false /p:PublishSingleFile=true
Write-Output "Building plugins"
foreach ($proj in Get-ChildItem "src/Plugins/CurvaLauncher.Plugins.*") {
if ($proj.Name.Contains("Test")) {
continue
}
dotnet build $proj -c Release -o build/tmp
Copy-Item "build/tmp/$($proj.Name).dll" "build/Plugins/"
}
# clean up
Remove-Item -Recurse -Force build/tmp
Remove-Item build/*.pdb
# Compress-Archive @("build/CurvaLauncher.exe", "build/Plugins") "build/CurvaLauncher.zip"