-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathcreate_packages.ps1
More file actions
31 lines (27 loc) · 907 Bytes
/
create_packages.ps1
File metadata and controls
31 lines (27 loc) · 907 Bytes
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
function Compress($rid)
{
$archive = ".\packages\$rid.zip"
if (Test-Path $archive)
{
Remove-Item $archive
}
Compress-Archive -Path .\packages\$rid\* $archive -CompressionLevel Optimal
Remove-Item -LiteralPath ".\packages\$rid\" -Force -Recurse
}
# ----------------------------
# Make Self-contained packages
# ----------------------------
dotnet publish .\CLI\CLI.csproj --output ./packages/mspc -p:UseAppHost=True
Compress("mspc")
# ----------------------------
# Make Self-contained packages
# ----------------------------
# Runtime Identifiers
# See the following page for a complete list of Identifiers:
# https://docs.microsoft.com/en-us/dotnet/core/rid-catalog
$rids = @("win-x64","osx-x64","linux-x64")
foreach ($rid in $rids)
{
dotnet publish .\CLI\CLI.csproj --output ./packages/$RID --runtime $RID --self-contained true -p:UseAppHost=True -p:PublishSingleFile=true
Compress($rid)
}