forked from elastic/elasticsearch-net
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sh
executable file
·45 lines (40 loc) · 1.69 KB
/
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
NUGET="build/tools/nuget/nuget.exe"
FAKE="build/tools/FAKE/tools/Fake.exe"
NUNIT="build/tools/NUnit.Runners/tools/nunit-console.exe"
FSHARPCLI="build/tools/Fsharp.Formatting.CommandTool/Fsharp.Formatting.CommandTool.nupkg"
SOURCELINK="build/tools/SourceLink.Fake/SourceLink.Fake.nupkg"
#we need nuget to install tools locally
if [[ ! -f "$NUGET" ]]; then
echo NUGET not found.. Download...
mkdir -p build/tools/nuget
curl -o $NUGET http://build.nuget.org/drops/client/master/NuGet.exe
fi
#we need FAKE to process our build scripts
if [[ ! -f "$FAKE" ]]; then
echo FAKE not found.. Installing..
mono --runtime=v4.0 "$NUGET" "install" "FAKE" "-OutputDirectory" "build/tools" "-ExcludeVersion" "-Prerelease"
fi
# we need nunit-console to run our tests
if [[ ! -f "$NUNIT" ]]; then
echo Nunit not found.. Installing
mono --runtime=v4.0 "$NUGET" "install" "NUnit.Runners" "-OutputDirectory" "build/tools" "-ExcludeVersion" "-Prerelease"
fi
if [[ ! -f "$FSHARPCLI" ]]; then
echo Fsharp formatting commandtool not found... Installing..
mono --runtime=v4.0 "$NUGET" install FSharp.Formatting.CommandTool -OutputDirectory build/tools -ExcludeVersion -Prerelease
fi
if [[ ! -f "$SOURCELINK" ]]; then
echo SourceLink not found.. installing
mono --runtime=v4.0 "$NUGET" install SourceLink.Fake -OutputDirectory build/tools -ExcludeVersion
fi
#workaround assembly resolution issues in build.fsx
export FSHARPI=`which fsharpi`
cat - > fsharpi <<"EOF"
#!/bin/bash
libdir=$PWD/build/tools/FAKE/tools/
$FSHARPI --lib:$libdir $@
EOF
chmod +x fsharpi
mono --runtime=v4.0 "$FAKE" build/build.fsx $@
rm fsharpi
#"build\tools\FAKE\tools\Fake.exe" "build\build.fsx" "target=%TARGET%" "version=%VERSION%"