-
Notifications
You must be signed in to change notification settings - Fork 5
/
build.sh
executable file
·50 lines (36 loc) · 904 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
#!/usr/bin/env bash
set -eu
cd "$(dirname "$0")"
PAKET_BOOTSTRAPPER_EXE=.paket/paket.exe
PAKET_EXE=.paket/paket.exe
FAKE_EXE=packages/build/FAKE/tools/FAKE.exe
FSIARGS=""
FSIARGS2=""
OS=${OS:-"unknown"}
echo $OSTYPE
if [ "$OS" != "Windows_NT" ]
then
# Can't use FSIARGS="--fsiargs -d:MONO" in zsh, so split it up
# (Can't use arrays since dash can't handle them)
FSIARGS="--fsiargs"
FSIARGS2="-d:MONO"
# Allows NETFramework like net45 to be built using dotnet core tooling with mono
export FrameworkPathOverride=$(dirname $(which mono))/../lib/mono/4.5/
fi
run() {
if [ "$OS" != "Windows_NT" ]
then
mono "$@"
else
"$@"
fi
}
run $PAKET_EXE restore
run $PAKET_EXE restore --group build
# build template
pushd Content/
./build.sh
./build.sh Clean
popd
rm -rf Content/node_modules Content/packages Content/paket-files
run $FAKE_EXE "$@" $FSIARGS $FSIARGS2 build.fsx