Browse files

kibana 5.0.0

Fix path in Kibana caveats: The situation we want to avoid is directing
the user to a path that doesn’t exist. For example, if someone has
Kibana 4.5.1 installed and the Kibana formula was just updated to
version 4.6.0, then the caveat will advise the user to copy
`$HOMEBREW_CELLAR/kibana/4.6.0/installedPlugins` instead of

Closes #6640.

Signed-off-by: Alex Dunn <>
  • Loading branch information...
MerelyAPseudonym authored and dunn committed Nov 5, 2016
1 parent 9106024 commit c7cf4de138e4d2d9561a130ea0b91224c1c33669
Showing with 14 additions and 27 deletions.
  1. +14 −27 Formula/kibana.rb
@@ -4,8 +4,8 @@ class Kibana < Formula
desc "Analytics and search dashboard for Elasticsearch"
homepage ""
url "",
:tag => "v4.5.1",
:revision => "addb28966a74b61791ceda352cd5b8b1200f2b2a"
:tag => "v5.0.0",
:revision => "c5af7a418333df6a934b8d1a5648c675641388bd"
head ""
@@ -16,30 +16,20 @@ class Kibana < Formula
sha256 "58dd7c70a51d0410ef7b3622e4022f2cc15a2060bc6a393bc29e1d79505084fb" => :mavericks
devel do
url "",
:tag => "v5.0.0-alpha3",
:revision => "b6190c95064a7c48c390c4566e82b5a562ca744f"
version "5.0.0-alpha3"
resource "node" do
url ""
sha256 "53c694c203ee18e7cd393612be08c61ed6ab8b2a165260984a99c014d1741414"
url "" # N.B. includes vendored dependencies
sha256 "2e2657d2ece89782ca9e2cc0300f9119998e73382caa7ad2995ab81cc26ad923"
def install
resource("node").stage buildpath/"node"
cd buildpath/"node" do
resource("node").stage do
system "./configure", "--prefix=#{libexec}/node"
system "make", "test"
system "make", "install"
# do not download binary installs of Node.js
inreplace buildpath/"tasks/build/index.js", /('_build:downloadNodeBuilds:\w+',)/, "// \\1"
# do not build packages for other platforms
platforms =["darwin-x64", "linux-x64", "linux-x86", "windows"])
platforms =["darwin-x64", "linux-x64", "linux-x86", "windows-x86"])
if OS.mac? && Hardware::CPU.is_64_bit?
platform = "darwin-x64"
elsif OS.linux?
@@ -51,20 +41,16 @@ def install
sub = platforms.to_a.join("|")
inreplace buildpath/"tasks/config/platforms.js", /('(#{sub})',?(?!;))/, "// \\1"
# do not build zip package
inreplace buildpath/"tasks/build/archives.js", /(await exec\('zip'.*)/, "// \\1"
# trick the build into thinking we've already downloaded the Node.js binary
mkdir_p buildpath/".node_binaries/#{resource("node").version}/#{platform}"
# set npm env and fix cache edge case (
ENV.prepend_path "PATH", prefix/"libexec/node/bin""#{ENV["HOME"]}/.npmrc").write Language::Node.npm_cache_config
system "npm", "install", "--verbose"
system "npm", "run", "build"
mkdir "tar" do
system "tar", "--strip-components", "1", "-xf", Dir[buildpath/"target/kibana-*-#{platform}.tar.gz"].first
system "npm", "run", "build", "--", "--release", "--skip-os-packages", "--skip-archives"
rm_f Dir["bin/*.bat"]
prefix.install "bin", "config", "node_modules", "optimize", "package.json", "src", "webpackShims"
prefix.install Dir["build/kibana-#{version}-#{platform.sub("x64", "x86_64")}/{bin,config,node_modules,optimize,package.json,src,webpackShims}"]
inreplace "#{bin}/kibana", %r{/node/bin/node}, "/libexec/node/bin/node"
@@ -77,13 +63,14 @@ def install
def post_install
ln_s etc/"kibana", prefix/"config"
def caveats; <<-EOS.undent
Config: #{etc}/kibana/
If you wish to preserve your plugins upon upgrade, make a copy of
#{prefix}/installedPlugins before upgrading, and copy it into the
#{opt_prefix}/plugins before upgrading, and copy it into the
new keg location after upgrading.

0 comments on commit c7cf4de

Please sign in to comment.