Skip to content

Commit

Permalink
bundle connector node
Browse files Browse the repository at this point in the history
Signed-off-by: Bugen Zhao <[email protected]>
  • Loading branch information
BugenZhao committed Mar 1, 2024
1 parent 49b41b6 commit e98fff6
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion Formula/risingwave.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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",
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit e98fff6

Please sign in to comment.