-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathRegularZip.ps1
More file actions
15 lines (15 loc) · 884 Bytes
/
RegularZip.ps1
File metadata and controls
15 lines (15 loc) · 884 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
if ((Get-ChildItem "bin\Release\net9.0" -Exclude "sc").Count -gt 0)
{
foreach ($dir in $(Get-ChildItem "bin\Release\net9.0" -Exclude @("sc", "*.zip") -Directory))
{
Write-Debug "Zipping $($dir.FullName)..."
# Determine platform
if ($dir.Name.Contains("win")) {
Compress-Archive -Path "$($dir.FullName)\*" -DestinationPath "bin\Release\net9.0\$($dir.Name.Replace("win", $([IO.Path]::GetFileName(((Get-Location).Path)))))-Windows.zip"
} elseif ($dir.Name.Contains("osx")) {
Compress-Archive -Path "$($dir.FullName)\*" -DestinationPath "bin\Release\net9.0\$($dir.Name.Replace("osx", $([IO.Path]::GetFileName(((Get-Location).Path)))))-MacOS.zip"
} elseif ($dir.Name.Contains("linux")) {
Compress-Archive -Path "$($dir.FullName)\*" -DestinationPath "bin\Release\net9.0\$($dir.Name.Replace("linux", $([IO.Path]::GetFileName(((Get-Location).Path)))))-Linux.zip"
}
}
}