buildkit: update build and test

Closes #120105.

Signed-off-by: Rui Chen <rui@chenrui.dev>
Signed-off-by: Patrick Linnane <patrick@linnane.io>
Signed-off-by: BrewTestBot <1589480+BrewTestBot@users.noreply.github.com>
master
Rui Chen 2023-01-08 23:56:55 -05:00 committed by BrewTestBot
parent af91efeade
commit 497eeb9a3b
No known key found for this signature in database
GPG Key ID: 82D7D104050B0F0F
1 changed files with 5 additions and 3 deletions

View File

@ -34,13 +34,15 @@ class Buildkit < Formula
-X github.com/moby/buildkit/version.Package=github.com/moby/buildkit
]
system "go", "build", "-mod=vendor", "-trimpath",
"-ldflags", ldflags.join(" "), "-o", bin/"buildctl", "./cmd/buildctl"
system "go", "build", "-mod=vendor", *std_go_args(ldflags: ldflags, output: bin/"buildctl"), "./cmd/buildctl"
doc.install Dir["docs/*.md"]
end
test do
shell_output("#{bin}/buildctl --addr unix://dev/null --timeout 0 du 2>&1", 1)
assert_match "make sure buildkitd is running",
shell_output("#{bin}/buildctl --addr unix://dev/null --timeout 0 du 2>&1", 1)
assert_match version.to_s, shell_output("#{bin}/buildctl --version")
end
end