From e98fff6a2d6424f834bd54fb8f276efb73b673fb Mon Sep 17 00:00:00 2001 From: Bugen Zhao Date: Thu, 29 Feb 2024 23:02:32 +0800 Subject: [PATCH] bundle connector node Signed-off-by: Bugen Zhao --- Formula/risingwave.rb | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/Formula/risingwave.rb b/Formula/risingwave.rb index 51ccff3..702d00a 100644 --- a/Formula/risingwave.rb +++ b/Formula/risingwave.rb @@ -4,6 +4,7 @@ class Risingwave < Formula url "https://github.com/risingwavelabs/risingwave/archive/refs/tags/v1.7.0.tar.gz" sha256 "139d9b0947618ce711000b0a22bb05a0e3ce90f103e8f2f7e573dee485c2a6ad" license "Apache-2.0" + revision 1 head "https://github.com/risingwavelabs/risingwave.git", branch: "main" bottle do @@ -16,9 +17,15 @@ class Risingwave < Formula depends_on "cmake" => :build depends_on "protobuf" => :build depends_on "rustup-init" => :build + depends_on "java11" depends_on "openssl@3" depends_on "xz" + resource "connector" do + url "https://github.com/risingwavelabs/risingwave/releases/download/v1.7.0/risingwave-v1.7.0-x86_64-unknown-linux-all-in-one.tar.gz" + sha256 "aca4affd6fadf33b927d4945d9bfffb73ed4af528aa99b758903600352ac1321" + end + def install # this will install the necessary cargo/rustup toolchain bits in HOMEBREW_CACHE system "#{Formula["rustup-init"].bin}/rustup-init", @@ -50,7 +57,15 @@ def install system "cargo", "install", "--bin", "risingwave", "--features", "rw-static-link", - *std_cargo_args(path: "src/cmd_all") # "--locked", "--root ...", "--path src/cmd_all" + "--profile", "dev", # TODO: test only + *std_cargo_args(root: libexec, path: "src/cmd_all") + + resource("connector").stage do + (libexec/"libexec").install Dir["libs/*"] + end + + (bin/"risingwave").write_env_script (libexec/"bin"/"risingwave"), + CONNECTOR_LIBS_PATH: libexec/"libexec" end test do