forked from elastic/elasticsearch-net
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sh
executable file
·60 lines (50 loc) · 1.81 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#!/usr/bin/env bash
FAKE="packages/build/FAKE/tools/FAKE.exe"
BUILDSCRIPT="build/scripts/Targets.fsx"
TARGET="build"
VERSION=
ESVERSIONS=
SKIPTESTS=0
APIKEY=
APIKEYPROVIDED="<empty>"
FEED="elasticsearch-net"
NEST_INTEGRATION_CLUSTER=
NEST_TEST_FILTER=
if [[ "${1,,}" == "skiptests" ]]; then SKIPTESTS=1; shift; fi
if [[ ! -z "$1" ]]; then TARGET=$1; fi
if [[ "${TARGET,,}" == "quick" ]]; then SKIPPAKET=1; fi
if [[ "${TARGET,,}" == "forever" ]]; then SKIPPAKET=1; fi
if [[ $SKIPPAKET -ne 1 ]]; then
mono .paket/paket.bootstrapper.exe
mono .paket/paket.exe restore
fi
if [[ $SKIPPAKET -eq 1 && ! -f .paket/paket.exe ]]; then
mono .paket/paket.bootstrapper.exe
mono .paket/paket.exe restore
fi
if [[ "${TARGET,,}" == "quick" ]] || [[ "${TARGET,,}" == "forever" ]]; then
if [[ ! -z "$2" ]]; then NEST_TEST_FILTER=$2; fi
fi
if [[ "${TARGET,,}" == "integrate" ]]; then
if [[ ! -z "$2" ]]; then ESVERSIONS=$2; fi
if [[ ! -z "$3" ]]; then NEST_INTEGRATION_CLUSTER=$3; fi
if [[ ! -z "$4" ]]; then NEST_TEST_FILTER=$4; fi
if [[ ! -z "$JAVA_HOME" ]]; then
echo JAVA_HOME not set so no point in running integration tests is there?!
exit /b 1
fi
fi
if [[ "${TARGET,,}" == "canary" ]]; then
if [[ ! -z "$2" ]]; then
APIKEY=$2
APKEYPROVIDED="<redacted>"
fi
if [[ ! -z "$3" ]]; then FEED=$3; fi
fi
echo build.sh: target=$TARGET skippakket=$SKIPPAKET version=$VERSION esversions=$ESVERSIONS skiptests=$SKIPTESTS apiKey=$APIKEYPROVIDED feed=$FEED escluster=$NEST_INTEGRATION_CLUSTER testfilter=$NEST_TEST_FILTER
export TARGET
export VERSION
export ESVERSIONS
export NEST_INTEGRATION_CLUSTER
export NEST_TEST_FILTER
mono $FAKE $@ --fsiargs -d:MONO $BUILDSCRIPT "target=$TARGET" "version=$VERSION" "esversions=$ESVERSIONS" "skiptests=$SKIPTESTS" "apiKey=$APIKEY" "feed=$FEED" "escluster=$NEST_INTEGRATION_CLUSTER" "testfilter=$NEST_TEST_FILTER"