-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathSelfContainedZip.ps1
More file actions
15 lines (15 loc) · 884 Bytes
/
SelfContainedZip.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\sc").Count -gt 0)
{
foreach ($dir in $(Get-ChildItem "bin\Release\net9.0\sc"))
{
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-SelfContained.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-SelfContained.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-SelfContained.zip"
}
}
}