Skip to content

Commit d4cf5bc

Browse files
committed
Adjusting the build scripts to correctly load the logstash source and allow people to override it
1 parent 01b35bc commit d4cf5bc

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

Gemfile

+3-2
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@ source 'https://rubygems.org'
22

33
gemspec
44

5-
logstash_path = "../../logstash"
5+
logstash_path = ENV["LOGSTASH_PATH"] || "../../logstash"
6+
use_logstash_source = ENV["LOGSTASH_SOURCE"] && ENV["LOGSTASH_SOURCE"].to_s == "1"
67

7-
if Dir.exist?(logstash_path) && ENV["LOGSTASH_SOURCE"] == 1
8+
if Dir.exist?(logstash_path) && use_logstash_source
89
gem 'logstash-core', :path => "#{logstash_path}/logstash-core"
910
gem 'logstash-core-plugin-api', :path => "#{logstash_path}/logstash-core-plugin-api"
1011
end

ci/build.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@
88
set -e
99

1010
echo "Starting build process in: `pwd`"
11-
./ci/setup.sh
11+
source ./ci/setup.sh
1212

1313
if [[ -f "ci/run.sh" ]]; then
1414
echo "Running custom build script in: `pwd`/ci/run.sh"
15-
./ci/run.sh
15+
source ./ci/run.sh
1616
else
1717
echo "Running default build scripts in: `pwd`/ci/build.sh"
1818
bundle install

0 commit comments

Comments
 (0)