Skip to content

Commit f84178d

Browse files
committed
Fix Homebrew formula to build from source instead of using cargo install
1 parent 7ca1c8d commit f84178d

1 file changed

Lines changed: 16 additions & 29 deletions

File tree

Formula/waspswithbazookas.rb

Lines changed: 16 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,25 @@
11
class Waspswithbazookas < Formula
2-
desc "Distributed load testing tool - like bees with machine guns, but way more power!"
2+
desc "Distributed HTTP/S load testing tool with cluster-based architecture"
33
homepage "https://github.com/Phara0h/WaspsWithBazookas"
4-
version "2.0.1"
5-
license "GPL-2.0"
6-
7-
on_macos do
8-
if Hardware::CPU.arm?
9-
url "https://github.com/Phara0h/WaspsWithBazookas/releases/download/v#{version}/waspswithbazookas-macos-aarch64.tar.gz"
10-
sha256 "PLACEHOLDER_SHA256" # This will be updated by the release process
11-
else
12-
url "https://github.com/Phara0h/WaspsWithBazookas/releases/download/v#{version}/waspswithbazookas-macos-x86_64.tar.gz"
13-
sha256 "PLACEHOLDER_SHA256" # This will be updated by the release process
14-
end
15-
end
4+
url "https://github.com/Phara0h/WaspsWithBazookas/archive/refs/tags/v2.0.1.tar.gz"
5+
sha256 "REPLACE_ME_WITH_SHA256"
6+
license "GPL-2.0-or-later"
167

17-
on_linux do
18-
if Hardware::CPU.arm?
19-
url "https://github.com/Phara0h/WaspsWithBazookas/releases/download/v#{version}/waspswithbazookas-linux-aarch64.tar.gz"
20-
sha256 "PLACEHOLDER_SHA256" # This will be updated by the release process
21-
else
22-
url "https://github.com/Phara0h/WaspsWithBazookas/releases/download/v#{version}/waspswithbazookas-linux-x86_64.tar.gz"
23-
sha256 "PLACEHOLDER_SHA256" # This will be updated by the release process
24-
end
25-
end
8+
depends_on "rust" => :build
269

2710
def install
28-
bin.install "hive"
29-
bin.install "wasp"
30-
bin.install "test-dummy"
11+
# Build all binaries from source
12+
system "cargo", "build", "--release", "--bin", "hive", "--bin", "wasp", "--bin", "test-dummy"
13+
14+
# Install the binaries
15+
bin.install "target/release/hive"
16+
bin.install "target/release/wasp"
17+
bin.install "target/release/test-dummy"
3118
end
3219

3320
test do
34-
system "#{bin}/hive", "--version"
35-
system "#{bin}/wasp", "--version"
36-
system "#{bin}/test-dummy", "--version"
21+
assert_match version.to_s, shell_output("#{bin}/hive --version")
22+
assert_match version.to_s, shell_output("#{bin}/wasp --version")
23+
assert_match version.to_s, shell_output("#{bin}/test-dummy --version")
3724
end
38-
end
25+
end

0 commit comments

Comments
 (0)