Adds OS detection into the publish script
This commit is contained in:
parent
bc2487946c
commit
9c893eb55d
1 changed files with 9 additions and 13 deletions
|
|
@ -6,6 +6,15 @@ dotnet restore --force-evaluate
|
||||||
GOTO :CMDSCRIPT
|
GOTO :CMDSCRIPT
|
||||||
|
|
||||||
::SHELLSCRIPT
|
::SHELLSCRIPT
|
||||||
|
if [[ $(uname) = "Darwin" ]]
|
||||||
|
then
|
||||||
|
r="-r osx-x64"
|
||||||
|
if [[ -f /etc/os-release ]]
|
||||||
|
then
|
||||||
|
. /etc/os-release
|
||||||
|
r="-r ${NAME,,}.$VERSION_ID-x64"
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ -z $2 ]] || [[ ${2,,} = "core" ]]
|
if [[ -z $2 ]] || [[ ${2,,} = "core" ]]
|
||||||
then
|
then
|
||||||
f="-f netcoreapp3.1"
|
f="-f netcoreapp3.1"
|
||||||
|
|
@ -20,19 +29,6 @@ else
|
||||||
c="-c ${3^}"
|
c="-c ${3^}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ $1 ]]
|
|
||||||
then
|
|
||||||
runtime=${1,,}
|
|
||||||
r="-r $runtime-x64"
|
|
||||||
else
|
|
||||||
if [[ $(uname) = "Darwin" ]]
|
|
||||||
then
|
|
||||||
r="-r osx-x64"
|
|
||||||
else
|
|
||||||
r="-r linux-x64"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo 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 Projects/Server/Server.csproj
|
||||||
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
|
echo dotnet publish ${c} ${r} ${f} --no-restore --self-contained=false -o Distribution/Assemblies Projects/UOContent/UOContent.csproj
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue