Skip to content

Commit ed3d03d

Browse files
committed
docker-debug 0.7.10 (new formula)
Signed-off-by: Rui Chen <[email protected]>
1 parent 2fc6896 commit ed3d03d

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

Formula/d/docker-debug.rb

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
class DockerDebug < Formula
2+
desc "Use new container attach on already container go on debug"
3+
homepage "https://github.com/zeromake/docker-debug"
4+
url "https://github.com/zeromake/docker-debug/archive/refs/tags/v0.7.10.tar.gz"
5+
sha256 "5b7682acc6dcf93d9d260de88c269657348c4ef6db1ef184d794786509ba0af3"
6+
license "MIT"
7+
head "https://github.com/zeromake/docker-debug.git", branch: "master"
8+
9+
depends_on "go" => :build
10+
11+
def install
12+
ldflags = %W[
13+
-s -w
14+
-X github.com/zeromake/docker-debug/version.Version=#{version}
15+
-X github.com/zeromake/docker-debug/version.GitCommit=#{tap.user}
16+
-X github.com/zeromake/docker-debug/version.BuildTime=#{time.iso8601}
17+
-X github.com/zeromake/docker-debug/version.PlatformName=#{tap.user}
18+
]
19+
system "go", "build", *std_go_args(ldflags:), "./cmd/docker-debug"
20+
21+
generate_completions_from_executable(bin/"docker-debug", "completion", shells: [:bash, :zsh, :fish, :pwsh])
22+
end
23+
24+
test do
25+
assert_match version.to_s, shell_output("#{bin}/docker-debug info")
26+
27+
system bin/"docker-debug", "init"
28+
assert_match "mount_dir = \"/mnt/container\"", (testpath/".docker-debug/config.toml").read
29+
30+
assert_match "\"TLS\": false", shell_output("#{bin}/docker-debug config")
31+
end
32+
end

0 commit comments

Comments
 (0)