forked from Azure/azure-relay-aspnetserver
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sh
executable file
·31 lines (25 loc) · 839 Bytes
/
build.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
#!/usr/bin/env bash
source="${BASH_SOURCE[0]}"
# resolve $SOURCE until the file is no longer a symlink
while [[ -h $source ]]; do
scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"
source="$(readlink "$source")"
# if $source was a relative symlink, we need to resolve it relative to the path where the
# symlink file was located
[[ $source != /* ]] && source="$scriptroot/$source"
done
scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"
if [ ${TF_BUILD}="True" ]; then
BuildConfiguration="Release"
else
BuildConfiguration="Debug"
fi
echo "dotnet build '${scriptroot}/AzureRelayServer.sln' --configuration ${BuildConfiguration}"
dotnet build "${scriptroot}/AzureRelayServer.sln" --configuration ${BuildConfiguration}
if [ $? -eq 0 ]
then
exit 0
else
echo "Error during running dotnet build" >&2
exit 1
fi