Skip to content

Commit e03150b

Browse files
committed
ipfs: use tarball, add fish/zsh completions
1 parent fd4559c commit e03150b

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

Formula/i/ipfs.rb

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
class Ipfs < Formula
22
desc "Peer-to-peer hypermedia protocol"
33
homepage "https://ipfs.tech/"
4-
url "https://github.com/ipfs/kubo.git",
5-
tag: "v0.33.0",
6-
revision: "8b657380277b79299dffe42993ec4f7de4a759d3"
4+
url "https://github.com/ipfs/kubo/archive/refs/tags/v0.33.0.tar.gz"
5+
sha256 "f58da2d4e8552b0d76c95715ec86bf868216fdd539669ea060827a527458cc5f"
76
license all_of: [
87
"MIT",
98
any_of: ["MIT", "Apache-2.0"],
@@ -27,17 +26,20 @@ class Ipfs < Formula
2726
depends_on "go" => :build
2827

2928
def install
30-
system "make", "build"
31-
bin.install "cmd/ipfs/ipfs"
29+
ldflags = %W[
30+
-s -w
31+
-X github.com/ipfs/kubo.CurrentCommit=#{tap.user}
32+
]
33+
system "go", "build", *std_go_args(ldflags:), "./cmd/ipfs"
3234

33-
generate_completions_from_executable(bin/"ipfs", "commands", "completion", shells: [:bash])
35+
generate_completions_from_executable(bin/"ipfs", "commands", "completion")
3436
end
3537

3638
service do
3739
run [opt_bin/"ipfs", "daemon"]
3840
end
3941

4042
test do
41-
assert_match "initializing IPFS node", shell_output(bin/"ipfs init")
43+
assert_match "initializing IPFS node", shell_output("#{bin}/ipfs init")
4244
end
4345
end

0 commit comments

Comments
 (0)