forked from Lidarr/Lidarr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.ps1
29 lines (21 loc) · 964 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
27
28
29
dotnet msbuild -restore src/Lidarr.sln -p:Configuration=Release -p:Platform=Posix -t:PublishAllRids
# Specify the folder and zip file names
$destFolder = "lidarr.develop.zhangdoa.linux-core-arm64"
$zipFile = "$destFolder.zip"
# Remove existing folder and zip file if they exist
if (Test-Path $destFolder) {
Remove-Item -Path $destFolder -Recurse -Force
}
if (Test-Path $zipFile) {
Remove-Item -Path $zipFile -Force
}
# Create destination folder
New-Item -ItemType Directory -Path $destFolder -Force
# Copy content to destination folder using robocopy
robocopy "_output\net6.0\linux-arm64\publish" $destFolder /E
# Copy Lidarr.Update content using robocopy
robocopy "_output\Lidarr.Update\net6.0\linux-arm64\publish" "$destFolder\Lidarr.Update" /E
# Copy UI content to UI subfolder using robocopy
robocopy "_output\UI" "$destFolder\UI" /E
# Compress the destination folder to .zip
Compress-Archive -Path $destFolder -DestinationPath $zipFile -Force