Skip to content

Commit e50f3da

Browse files
committed
weaviate 1.27.6 (new formula)
1 parent 797f007 commit e50f3da

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

Formula/w/weaviate.rb

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
class Weaviate < Formula
2+
desc "Open-source vector database that stores both objects and vectors"
3+
homepage "https://weaviate.io/developers/weaviate/"
4+
url "https://github.com/weaviate/weaviate/archive/refs/tags/v1.27.6.tar.gz"
5+
sha256 "d8cad0339ccfd081be6afe1afd879f64bba224ed7ecbdb8b974853b536584330"
6+
license "BSD-3-Clause"
7+
8+
depends_on "go" => :build
9+
10+
def install
11+
ldflags = %W[
12+
-s -w
13+
-X github.com/weaviate/weaviate/usecases/build.Version=#{version}
14+
-X github.com/weaviate/weaviate/usecases/build.BuildUser=#{tap.user}
15+
-X github.com/weaviate/weaviate/usecases/build.BuildDate=#{time.iso8601}
16+
]
17+
system "go", "build", *std_go_args(ldflags:), "./cmd/weaviate-server"
18+
end
19+
20+
test do
21+
port = free_port
22+
pid = spawn bin/"weaviate", "--host", "0.0.0.0", "--port", port.to_s, "--scheme", "http"
23+
sleep 10
24+
assert_match version.to_s, shell_output("curl localhost:#{port}/v1/meta")
25+
ensure
26+
Process.kill "TERM", pid
27+
Process.wait pid
28+
end
29+
end

0 commit comments

Comments
 (0)