From 0165c99d145f63871d51616733cf437e323759ba Mon Sep 17 00:00:00 2001 From: Adithya Krishna Date: Mon, 28 Oct 2024 12:54:00 +0530 Subject: [PATCH] indexify-server 0.2.6 (new-formula) Signed-off-by: Adithya Krishna --- Formula/i/indexify-server.rb | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 Formula/i/indexify-server.rb diff --git a/Formula/i/indexify-server.rb b/Formula/i/indexify-server.rb new file mode 100644 index 000000000000..2adc6490c6f8 --- /dev/null +++ b/Formula/i/indexify-server.rb @@ -0,0 +1,29 @@ +class IndexifyServer < Formula + desc "CLI for Indexify, a realtime serving engine for Data-Intensive Generative AI" + homepage "https://www.tensorlake.ai" + url "https://github.com/tensorlakeai/indexify.git", + tag: "v0.2.6", + revision: "6ef0c395b5ba253575a2ee924e6cf726d9db239e" + license "Apache-2.0" + + def install + os = OS.mac? ? "darwin" : "linux" + arch = Hardware::CPU.arm? ? "arm64" : "amd64" + binary_url = "https://github.com/tensorlakeai/indexify/releases/download/v#{version}/indexify-server-#{version}-#{os}-#{arch}" + + system "curl", "-L", "-o", "indexify-server", binary_url + chmod "a+x", "indexify-server" + + bin.install "indexify-server" + + system "curl", "-X", "POST", + "https://tensorlake.ai/api/analytics", + "-H", "Content-Type: application/json", + "-d", "{\"event\": \"indexify_download\", \"platform\": \"#{os}\", \"machine\": \"#{arch}\"}", + "--max-time", "1", "-s" + end + + test do + system bin/"indexify-server", "--version" + end +end