Adds official .NET 5 support (#300)

This commit is contained in:
Kamron Batman 2020-11-07 13:26:27 -08:00 committed by GitHub
parent c3289a20ab
commit 013f333898
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
39 changed files with 496 additions and 668 deletions

View file

@ -5,63 +5,47 @@ dotnet restore --force-evaluate
GOTO :CMDSCRIPT
::SHELLSCRIPT
os=$1
config=$1
os=$2
if [[ $os ]]; then
r="-r $os-x64"
os="-r $os-x64"
elif [[ $(uname) = "Darwin" ]]; then
r="-r osx-x64"
os="-r osx-x64"
elif [[ -f /etc/os-release ]]; then
. /etc/os-release
NAME="$(tr '[:upper:]' '[:lower:]' <<< $NAME)"
r="-r $NAME.$VERSION_ID-x64"
os="-r $NAME.$VERSION_ID-x64"
fi
framework="$(tr '[:upper:]' '[:lower:]' <<< $2)"
if [[ $framework = "net" ]]; then
f="-f net5.0"
else
f="-f netcoreapp3.1"
fi
if [[ -z $3 ]]; then
c="-c Release"
else
if [[ $config ]]; then
config="$(tr '[:lower:]' '[:upper:]' <<< ${3:0:1})${3:1}"
c="-c $config"
config="-c $config"
else
config="-c Release"
fi
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
echo dotnet publish ${config} ${os} -f net5.0 --no-restore --self-contained=false -o Distribution Projects/Server/Server.csproj
dotnet publish ${config} ${os} -f net5.0 --no-restore --self-contained=false -o Distribution Projects/Server/Server.csproj
echo dotnet publish ${config} ${os} -f net5.0 --no-restore --self-contained=false -o Distribution/Assemblies Projects/UOContent/UOContent.csproj
dotnet publish ${config} ${os} -f net5.0 --no-restore --self-contained=false -o Distribution/Assemblies Projects/UOContent/UOContent.csproj
exit $?
:CMDSCRIPT
IF "%~1" == "" or "%~1" == "release" (
SET config=-c Release
) ELSE (
SET config=-c Debug
)
IF "%~2" == "" (
SET f=-f netcoreapp3.1
SET os=-r win-x64
) ELSE (
IF "%~2" == "core" (
SET f=-f netcoreapp3.1
) ELSE (
SET f=-f net5.0
)
SET os=-r %~1-x64
)
IF "%~3" == "" or "%~3" == "release" (
SET c=-c Release
) ELSE (
SET c=-c Debug
)
IF "%~1" == "" (
SET r=-r win-x64
) ELSE (
SET r=-r %~1-x64
)
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
echo dotnet publish %config% %os% -f net5.0 --no-restore --self-contained=false -o Distribution Projects\Server\Server.csproj
dotnet publish %config% %os% -f net5.0 --no-restore --self-contained=false -o Distribution Projects\Server\Server.csproj
echo dotnet publish %config% %os% -f net5.0 --no-restore --self-contained=false -o Distribution\Assemblies Projects\UOContent\UOContent.csproj
dotnet publish %config% %os% -f net5.0 --no-restore --self-contained=false -o Distribution\Assemblies Projects\UOContent\UOContent.csproj