diff --git a/Formula/w/wgo.rb b/Formula/w/wgo.rb new file mode 100644 index 0000000000000..01a58388b359a --- /dev/null +++ b/Formula/w/wgo.rb @@ -0,0 +1,19 @@ +class Wgo < Formula + desc "Watch arbitrary files and respond with arbitrary commands" + homepage "https://github.com/bokwoon95/wgo" + url "https://github.com/bokwoon95/wgo/archive/refs/tags/v0.5.6d.tar.gz" + sha256 "2c2cdfa06678fe58f6d402d6c088a7b4132a717239b74256dbccf1f3421ae7db" + license "MIT" + + depends_on "go" => :build + + def install + bin.mkpath + system "go", "build", *std_go_args(ldflags: "-s -w") + end + + test do + output = shell_output("#{bin}/wgo -exit echo testing") + assert_match "testing", output + end +end