-
Notifications
You must be signed in to change notification settings - Fork 33
/
Copy pathpackage.sh
executable file
·31 lines (25 loc) · 1.01 KB
/
package.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 pack '${scriptroot}/Microsoft.Azure.Relay.sln' --no-build --no-dependencies --no-restore /p:Version=${CDP_PACKAGE_VERSION_SEMANTIC:-3.0.1} --configuration ${BuildConfiguration}"
dotnet pack "${scriptroot}/Microsoft.Azure.Relay.sln" --no-build --no-dependencies --no-restore /p:Version=${CDP_PACKAGE_VERSION_SEMANTIC:-3.0.1} --configuration ${BuildConfiguration}
if [ $? -eq 0 ]
then
exit 0
else
echo "Error during running dotnet build" >&2
exit 1
fi