forked from modernuo/ModernUO
-
Notifications
You must be signed in to change notification settings - Fork 1
/
publish.sh
executable file
·45 lines (36 loc) · 1.02 KB
/
publish.sh
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#!/bin/bash
config=$1
os=$2
arch=${3:-$(uname -m)}
if [[ -n $os ]]; then
os="-r $os"
elif [[ $(uname) = "Darwin" ]]; then
os="-r osx"
else
os="-r linux"
fi
if [[ $config ]]; then
config="$(tr '[:lower:]' '[:upper:]' <<< ${1:0:1})${1:1}"
config="-c $config"
else
config="-c Release"
fi
if [[ $arch == *'aarch'* || $arch == *'arm'* ]]; then
arch="arm64"
else
arch="x64"
fi
if [[ $os == *'centos'* || $os == *'rhel'* ]]; then
export DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=1
fi
echo dotnet tool restore
dotnet tool restore
echo dotnet clean --verbosity quiet
dotnet clean --verbosity quiet
echo dotnet restore --force-evaluate --source https://api.nuget.org/v3/index.json
dotnet restore --force-evaluate --source https://api.nuget.org/v3/index.json
echo dotnet publish ${config} ${os}-${arch} --no-restore --self-contained=false
dotnet publish ${config} ${os}-${arch} --no-restore --self-contained=false
echo Generating serialization migration schema...
dotnet tool run ModernUOSchemaGenerator -- ModernUO.sln
exit $?