Update publish script

This commit is contained in:
Marcello 2022-04-26 21:54:10 +02:00
parent d3ab7aaa31
commit 1a6f72bf78
Signed by: m-lamonaca
SSH key fingerprint: SHA256:8db8uii6Gweq7TbKixFBioW2T8CbgtyFETyYL3cr3zk
2 changed files with 26 additions and 1 deletions

26
dotnet-publish.ps1 Normal file
View file

@ -0,0 +1,26 @@
function Get-Runtime
{
if($isLinux)
{
return "linux-x64";
}
if($isMac)
{
return "osx-x64";
}
if($isWindows)
{
return "win-x64";
}
return $null;
}
$runtime = Get-Runtime;
if($runtime -ne $null)
{
dotnet publish -o out -c Release --self-contained -p:PublishSingleFile=true -p:PublishTrimmed=true -f net6.0 -r $runtime .\src\
}

View file

@ -1 +0,0 @@
dotnet publish -o out -c Release --self-contained -p:PublishSingleFile=true -p:PublishTrimmed=true -f net6.0 -r win-x64 .\src\