-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbuild.sh
executable file
·55 lines (39 loc) · 873 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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#!/bin/sh
StartGroup() {
if [ ! -z "$GITHUB_ACTION" ]; then
echo "::group::$1"
else
echo "##################################################"
printf '# %-46s #' "$1"
echo ""
echo "##################################################"
fi
}
EndGroup() {
if [ ! -z "$GITHUB_ACTION" ]; then
echo "::endgroup::$1"
else
echo "##################################################"
fi
}
StartGroup "Restoring .NET Core Tools"
dotnet tool restore
exitCode=$?
EndGroup "Restoring .NET Core Tools"
if [ "$exitCode" -ne "0" ]; then
exit $exitCode
fi
StartGroup "Bootstrapping Cake"
dotnet cake --bootstrap
exitCode=$?
EndGroup "Bootstrapping Cake"
if [ "$exitCode" -ne "0" ]; then
exit $exitCode
fi
StartGroup "Building project with cake"
dotnet cake $@
exitCode=$?
EndGroup "Bootstrapping Cake"
if [ "$exitCode" -ne "0" ]; then
exit $exitCode
fi