make available the new bin/logstash-plugin command that will be used in the feature releases of LS

Fixes #4891
This commit is contained in:
Pere Urbon-Bayes 2016-03-23 18:20:27 +01:00 committed by Suyog Rao
parent d98f7d946c
commit 799b06d1e4
4 changed files with 31 additions and 19 deletions

11
bin/logstash-plugin Executable file
View file

@ -0,0 +1,11 @@
#!/bin/sh
unset CDPATH
. "$(cd `dirname $0`/..; pwd)/bin/logstash.lib.sh"
setup
# bin/plugin is a short lived ruby script thus we can use aggressive "faster starting JRuby options"
# see https://github.com/jruby/jruby/wiki/Improving-startup-time
export JRUBY_OPTS="$JRUBY_OPTS -J-XX:+TieredCompilation -J-XX:TieredStopAtLevel=1 -J-noverify -X-C -Xcompile.invokedynamic=false"
ruby_exec "${LOGSTASH_HOME}/lib/pluginmanager/main.rb" "$@"

15
bin/logstash-plugin.bat Normal file
View file

@ -0,0 +1,15 @@
@echo off
SETLOCAL
set SCRIPT_DIR=%~dp0
CALL "%SCRIPT_DIR%\setup.bat"
:EXEC
if "%VENDORED_JRUBY%" == "" (
%RUBYCMD% "%LS_HOME%\lib\pluginmanager\main.rb" %*
) else (
%JRUBY_BIN% %jruby_opts% "%LS_HOME%\lib\pluginmanager\main.rb" %*
)
ENDLOCAL

View file

@ -1,13 +1,6 @@
#!/bin/sh
echo "The use of bin/plugin is deprecated and will be removed in a feature release."
echo "The use of bin/plugin is deprecated and will be removed in a feature release. Please use bin/logstash-plugin."
unset CDPATH
. "$(cd `dirname $0`/..; pwd)/bin/logstash.lib.sh"
setup
# bin/plugin is a short lived ruby script thus we can use aggressive "faster starting JRuby options"
# see https://github.com/jruby/jruby/wiki/Improving-startup-time
export JRUBY_OPTS="$JRUBY_OPTS -J-XX:+TieredCompilation -J-XX:TieredStopAtLevel=1 -J-noverify -X-C -Xcompile.invokedynamic=false"
ruby_exec "${LOGSTASH_HOME}/lib/pluginmanager/main.rb" "$@"
sh "$(cd `dirname $0`/..; pwd)/bin/logstash-plugin" "$@"

View file

@ -2,14 +2,7 @@
SETLOCAL
ECHO "The use of bin/plugin is deprecated and will be removed in a feature release. Please use bin/logstash-plugin."
set SCRIPT_DIR=%~dp0
CALL "%SCRIPT_DIR%\setup.bat"
:EXEC
if "%VENDORED_JRUBY%" == "" (
%RUBYCMD% "%LS_HOME%\lib\pluginmanager\main.rb" %*
) else (
%JRUBY_BIN% %jruby_opts% "%LS_HOME%\lib\pluginmanager\main.rb" %*
)
ENDLOCAL
CALL "%SCRIPT_DIR%\logstash-plugin.bat" %*