Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pilosa 0.6.0 #16688

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 22 additions & 8 deletions Formula/pilosa.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
require "language/go"

class Pilosa < Formula
desc "Distributed bitmap index that queries across data sets"
homepage "https://www.pilosa.com"
url "https://github.com/pilosa/pilosa/archive/v0.4.0.tar.gz"
sha256 "ec615c5d2584e5761ac20c6a6df6139f7018de65934f4c2d05e69cfd35d1d89e"
url "https://github.com/pilosa/pilosa/archive/v0.6.0.tar.gz"
sha256 "6121066051ab55f266f2c891edcc66d449aa5786c8622f7f765015806ee6f84f"

bottle do
cellar :any_skip_relocation
Expand All @@ -13,15 +15,26 @@ class Pilosa < Formula
end

depends_on "go" => :build
depends_on "glide" => :build
depends_on "dep" => :build

go_resource "github.com/rakyll/statik" do
url "https://github.com/rakyll/statik.git",
:revision => "25d6cab4d68d2a9b7c5965aa381726dd5dd6d7b8"
end

def install
require "time"
ENV["GOPATH"] = buildpath
ENV["GLIDE_HOME"] = HOMEBREW_CACHE/"glide_home/#{name}"
mkdir_p buildpath/"src/github.com/pilosa/"
ln_s buildpath, buildpath/"src/github.com/pilosa/pilosa"
system "make", "pilosa", "FLAGS=-o #{bin}/pilosa", "VERSION=#{version}"
ENV.prepend_path "PATH", "#{buildpath}/bin"

(buildpath/"src/github.com/pilosa/pilosa").install buildpath.children
Language::Go.stage_deps resources, buildpath/"src"

cd "src/github.com/rakyll/statik" do
system "go", "install"
end
cd "src/github.com/pilosa/pilosa" do
system "make", "generate-statik", "pilosa", "FLAGS=-o #{bin}/pilosa", "VERSION=#{version}"
end
end

plist_options :manual => "pilosa server"
Expand Down Expand Up @@ -59,6 +72,7 @@ def plist; <<-EOS.undent
end
sleep 0.5
assert_match("Welcome. Pilosa is running.", shell_output("curl localhost:10101"))
assert_match("<!DOCTYPE html>", shell_output("curl --user-agent NotCurl localhost:10101"))
ensure
Process.kill "TERM", server
Process.wait server
Expand Down