-
-
Notifications
You must be signed in to change notification settings - Fork 12.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
gurk: update build and test Signed-off-by: Rui Chen <[email protected]>
- Loading branch information
1 parent
19f792d
commit 7a23371
Showing
1 changed file
with
31 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
class Gurk < Formula | ||
desc "Signal Messenger client for terminal" | ||
homepage "https://github.com/boxdot/gurk-rs" | ||
url "https://github.com/boxdot/gurk-rs/archive/refs/tags/v0.5.2.tar.gz" | ||
sha256 "a8c190e081d9905ea6e71d38d56cb8f19596999a20cb9584a552ce46e6f88bed" | ||
license "AGPL-3.0-or-later" | ||
|
||
depends_on "protobuf" => :build | ||
depends_on "rust" => :build | ||
depends_on "pkgconf" => :build | ||
|
||
def install | ||
system "cargo", "install", *std_cargo_args | ||
end | ||
|
||
test do | ||
assert_match version.to_s, shell_output("#{bin}/gurk --version") | ||
|
||
return if OS.linux? && ENV["HOMEBREW_GITHUB_ACTIONS"] | ||
|
||
begin | ||
output_log = testpath/"output.log" | ||
pid = spawn bin/"gurk", "--relink", [:out, :err] => output_log.to_s | ||
sleep 2 | ||
assert_match "Linking new device with device name", output_log.read | ||
ensure | ||
Process.kill("TERM", pid) | ||
Process.wait(pid) | ||
end | ||
end | ||
end |