Skip to content

Commit 560882f

Browse files
committed
Fix broken $BUILD_PATH in build script
The build script was only working on travis, this makes it work locally again Fixes #600
1 parent 002e87a commit 560882f

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

build.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
set -ex
33

44
# Set the build dir to ./ if not set by travis
5-
BUILD_DIR=./
6-
if [ -z "$TRAVIS_BUILD_DIR" ]; then
5+
BUILD_DIR=$PWD
6+
if [[ -z "$TRAVIS_BUILD_DIR" && "$TRAVIS_BUILD_DIR" -ne "" ]]; then
77
BUILD_DIR=$TRAVIS_BUILD_DIR
88
fi
99

@@ -23,8 +23,8 @@ setup_es() {
2323
fi
2424
rm -f elasticsearch/config/scripts || true
2525
mkdir -p elasticsearch/config/scripts
26-
cp $TRAVIS_BUILD_DIR/spec/fixtures/scripts/groovy/* elasticsearch/config/scripts
27-
cp $TRAVIS_BUILD_DIR/spec/fixtures/scripts/painless/* elasticsearch/config/scripts
26+
cp $BUILD_DIR/spec/fixtures/scripts/groovy/* elasticsearch/config/scripts
27+
cp $BUILD_DIR/spec/fixtures/scripts/painless/* elasticsearch/config/scripts
2828
}
2929

3030
start_es() {
@@ -73,7 +73,7 @@ start_nginx() {
7373
if [[ "$INTEGRATION" != "true" ]]; then
7474
bundle exec rspec -fd spec
7575
else
76-
if [ "$1" -eq "" ]; then
76+
if [[ "$1" -eq "" ]]; then
7777
spec_path="spec"
7878
else
7979
spec_path="$1"

0 commit comments

Comments
 (0)