Adds .NET 5 & Ubuntu 20 LTS Targeting (#193)

This commit is contained in:
Kamron Batman 2020-08-15 14:48:06 -07:00 committed by GitHub
parent 958763932b
commit bc2487946c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 29329 additions and 326 deletions

View file

@ -1,20 +1,29 @@
#!/usr/bin/env bash
dotnet restore --force-evaluate
:<<"::SHELLSCRIPT"
@ECHO OFF
GOTO :CMDSCRIPT
::SHELLSCRIPT
if [[ -z $2 ]]
if [[ -z $2 ]] || [[ ${2,,} = "core" ]]
then
f="-f netcoreapp3.1"
else
f="-f net5.0"
fi
if [[ -z $3 ]]
then
c="-c Release"
else
c="-c $2"
c="-c ${3^}"
fi
dotnet restore --force-evaluate
if [[ $1 ]]
then
r="-r $1-x64"
runtime=${1,,}
r="-r $runtime-x64"
else
if [[ $(uname) = "Darwin" ]]
then
@ -24,18 +33,26 @@ else
fi
fi
dotnet publish ${c} ${r} --no-restore --self-contained=false -o Distribution Projects/Server/Server.csproj
dotnet publish ${c} ${r} --no-restore --self-contained=false -o Distribution/Assemblies Projects/UOContent/UOContent.csproj
echo dotnet publish ${c} ${r} ${f} --no-restore --self-contained=false -o Distribution Projects/Server/Server.csproj
dotnet publish ${c} ${r} ${f} --no-restore --self-contained=false -o Distribution Projects/Server/Server.csproj
echo dotnet publish ${c} ${r} ${f} --no-restore --self-contained=false -o Distribution/Assemblies Projects/UOContent/UOContent.csproj
dotnet publish ${c} ${r} ${f} --no-restore --self-contained=false -o Distribution/Assemblies Projects/UOContent/UOContent.csproj
exit $?
:CMDSCRIPT
IF "%~2" == "" (
SET c=-c Release
SET f=-f netcoreapp3.1
) ELSE IF "%~2" == "core" (
SET f=-f netcoreapp3.1
) ELSE (
SET c=-c %~2
SET f=-f net5.0
)
dotnet restore --force-evaluate
IF "%~3" == "" or "%~3" == "release" (
SET c=-c Release
) ELSE (
SET c=-c Debug
)
IF "%~1" == "" (
SET r=-r win-x64
@ -43,5 +60,7 @@ IF "%~1" == "" (
SET r=-r %~1-x64
)
dotnet publish %c% %r% --no-restore --self-contained=false -o Distribution Projects\Server\Server.csproj
dotnet publish %c% %r% --no-restore --self-contained=false -o Distribution\Assemblies Projects\UOContent\UOContent.csproj
echo dotnet publish %c% %r% %f% --no-restore --self-contained=false -o Distribution Projects\Server\Server.csproj
dotnet publish %c% %r% %f% --no-restore --self-contained=false -o Distribution Projects\Server\Server.csproj
echo dotnet publish %c% %r% %f% --no-restore --self-contained=false -o Distribution\Assemblies Projects\UOContent\UOContent.csproj
dotnet publish %c% %r% %f% --no-restore --self-contained=false -o Distribution\Assemblies Projects\UOContent\UOContent.csproj