Skip to content

Commit 08c7e75

Browse files
committed
clippy 1.5.1 (new formula)
1 parent 28af66a commit 08c7e75

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

Formula/c/clippy.rb

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
class Clippy < Formula
2+
desc "Copy files from your terminal that actually paste into GUI apps"
3+
homepage "https://github.com/neilberkman/clippy"
4+
url "https://github.com/neilberkman/clippy/archive/refs/tags/v1.5.1.tar.gz"
5+
sha256 "e1775535ee7b00ba1344696d0d60ae8067b445fa0e3b9ffb5fdfb56a0a10a0be"
6+
license "MIT"
7+
8+
depends_on "go" => :build
9+
depends_on :macos
10+
11+
def install
12+
ldflags = %W[
13+
-s -w
14+
-X github.com/neilberkman/clippy/cmd/internal/common.Version=#{version}
15+
-X github.com/neilberkman/clippy/cmd/internal/common.Commit=#{tap.user}
16+
-X github.com/neilberkman/clippy/cmd/internal/common.Date=#{time.iso8601}
17+
]
18+
system "go", "build", *std_go_args(ldflags:), "./cmd/clippy"
19+
system "go", "build", *std_go_args(ldflags:, output: bin/"pasty"), "./cmd/pasty"
20+
end
21+
22+
test do
23+
assert_match version.to_s, shell_output("#{bin}/clippy --version")
24+
assert_match version.to_s, shell_output("#{bin}/pasty --version")
25+
26+
(testpath/"test.txt").write("test content")
27+
system bin/"clippy", "-t", testpath/"test.txt"
28+
end
29+
end

0 commit comments

Comments
 (0)