forked from elastic/elasticsearch-net
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.bat
51 lines (40 loc) · 1.8 KB
/
build.bat
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
@echo off
REM we need nuget to install tools locally
if not exist build\tools\nuget\nuget.exe (
ECHO Nuget not found.. Downloading..
mkdir build\tools\nuget
PowerShell -NoProfile -ExecutionPolicy Bypass -Command "& 'build\download-nuget.ps1'"
)
REM we need FAKE to process our build scripts
if not exist build\tools\FAKE\tools\Fake.exe (
ECHO FAKE not found.. Installing..
"build\tools\nuget\nuget.exe" "install" "FAKE" "-OutputDirectory" "build\tools" "-ExcludeVersion" "-Prerelease"
)
REM we need nunit-console to run our tests
if not exist build\tools\NUnit.Runners\tools\nunit-console.exe (
ECHO Nunit not found.. Installing
"build\tools\nuget\nuget.exe" "install" "NUnit.Runners" "-OutputDirectory" "build\tools" "-ExcludeVersion" "-Prerelease"
)
REM we need wintersmith to build our documentation which in turn needs npm/node
REM installing and calling this locally so that yours and CI's systems do not need to be configured prior to running build.bat
if not exist build\tools\Node.js\node.exe (
ECHO Local node not found.. Installing..
"build\tools\nuget\nuget.exe" "install" "node.js" "-OutputDirectory" "build\tools" "-ExcludeVersion" "-Prerelease"
)
if not exist build\tools\Npm\node_modules\npm\cli.js (
ECHO Local npm not found.. Installing..
"build\tools\nuget\nuget.exe" "install" "npm" "-OutputDirectory" "build\tools" "-ExcludeVersion" "-Prerelease"
)
if not exist build\tools\node_modules\wintersmith\bin\wintersmith (
ECHO wintersmith not found.. Installing..
cd build\tools
"Node.js\node.exe" "Npm\node_modules\npm\cli.js" install wintersmith
cd ..\..
)
SET TARGET="Build"
SET VERSION=
IF NOT [%1]==[] (set TARGET="%1")
IF NOT [%2]==[] (set VERSION="%2")
shift
shift
"build\tools\FAKE\tools\Fake.exe" "build\build.fsx" "target=%TARGET%" "version=%VERSION%"