Skip to content

Commit 8c0778e

Browse files
committed
s5cmd 2.3.0 (new formula)
1 parent 8cbacef commit 8c0778e

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

Formula/s/s5cmd.rb

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
class S5cmd < Formula
2+
desc "Parallel S3 and local filesystem execution tool"
3+
homepage "https://github.com/peak/s5cmd/"
4+
url "https://github.com/peak/s5cmd/archive/refs/tags/v2.3.0.tar.gz"
5+
sha256 "6910763a7320010aa75fe9ef26f622e440c2bd6de41afdbfd64e78c158ca19d4"
6+
license "MIT"
7+
head "https://github.com/peak/s5cmd.git", branch: "master"
8+
9+
depends_on "go" => :build
10+
11+
def install
12+
ldflags = %W[
13+
-s -w
14+
-X=github.com/peak/s5cmd/v2/version.Version=#{version}
15+
-X=github.com/peak/s5cmd/v2/version.GitCommit=#{tap.user}
16+
]
17+
system "go", "build", *std_go_args(ldflags:)
18+
generate_completions_from_executable(bin/"s5cmd", "--install-completion")
19+
end
20+
21+
test do
22+
assert_match "no valid providers in chain", shell_output("#{bin}/s5cmd --retry-count 0 ls s3://brewtest 2>&1", 1)
23+
assert_match version.to_s, shell_output("#{bin}/s5cmd version")
24+
end
25+
end

0 commit comments

Comments
 (0)