From 7abfff11297f8fcaa782bc098e86037480f199a6 Mon Sep 17 00:00:00 2001 From: Rui Chen Date: Fri, 14 Mar 2025 22:29:05 -0400 Subject: [PATCH 1/2] ssx 0.5.1 (new formula) Signed-off-by: Rui Chen --- Formula/s/ssx.rb | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 Formula/s/ssx.rb diff --git a/Formula/s/ssx.rb b/Formula/s/ssx.rb new file mode 100644 index 0000000000..7a625c543c --- /dev/null +++ b/Formula/s/ssx.rb @@ -0,0 +1,27 @@ +# framework: cobra +class Ssx < Formula + desc "Retentive ssh client" + homepage "https://ssx.vimiix.com/" + url "https://github.com/vimiix/ssx/archive/refs/tags/v0.5.1.tar.gz" + sha256 "fae6de5047f4f9adc959078ffc3b1f03cd1c1d7294f2ec6a797a4ff5dbbfbd7a" + license "MIT" + head "https://github.com/vimiix/ssx.git", branch: "main" + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X github.com/vimiix/ssx/ssx/version.Version=#{version} + -X github.com/vimiix/ssx/ssx/version.Revision=#{tap.user} + -X github.com/vimiix/ssx/ssx/version.BuildDate=#{time.iso8601} + ] + system "go", "build", *std_go_args(ldflags:), "./cmd/ssx" + end + + test do + assert_match version.to_s, shell_output("#{bin}/ssx --version") + + assert_match "operation not permitted", shell_output("#{bin}/ssx list 2>&1", 1) + end +end From 53c283114950135b838c6aef4a892dced99bbb59 Mon Sep 17 00:00:00 2001 From: Rui Chen Date: Sun, 25 May 2025 17:05:19 -0400 Subject: [PATCH 2/2] ssx: update test Signed-off-by: Rui Chen --- Formula/s/ssx.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Formula/s/ssx.rb b/Formula/s/ssx.rb index 7a625c543c..40f8f75d0b 100644 --- a/Formula/s/ssx.rb +++ b/Formula/s/ssx.rb @@ -22,6 +22,11 @@ def install test do assert_match version.to_s, shell_output("#{bin}/ssx --version") - assert_match "operation not permitted", shell_output("#{bin}/ssx list 2>&1", 1) + expected_output = if OS.mac? + "operation not permitted" + else + "lookup 100: no such host" + end + assert_match expected_output, shell_output("#{bin}/ssx 100 2>&1", 1) end end