2018-01-10 17:51:56 +00:00
|
|
|
class ContainerDiff < Formula
|
|
|
|
desc "Diff your Docker containers"
|
|
|
|
homepage "https://github.com/GoogleCloudPlatform/container-diff"
|
2018-03-19 21:33:07 +00:00
|
|
|
url "https://github.com/GoogleCloudPlatform/container-diff/archive/v0.8.0.tar.gz"
|
|
|
|
sha256 "e6a9bf2c30babd16bc7efe5803d9a2cbdd733206d4b1bc71fe7a442872848623"
|
2018-01-10 17:51:56 +00:00
|
|
|
|
2018-01-24 10:01:24 +00:00
|
|
|
bottle do
|
|
|
|
cellar :any_skip_relocation
|
2018-03-19 21:38:01 +00:00
|
|
|
sha256 "e809e868ab051d530d310d9a550124dc1dbc429d6bf2a9e7306922720504c73e" => :high_sierra
|
|
|
|
sha256 "e8f9e5795ac47eec3f8ea0ad4613d6955ab377d74fd14402b7079ea45ebe45a7" => :sierra
|
|
|
|
sha256 "17be75856c9de704f3ef866c8d71ca07ee03ed2f2e71efa21821e20fc078feac" => :el_capitan
|
2018-01-24 10:01:24 +00:00
|
|
|
end
|
|
|
|
|
2018-01-10 17:51:56 +00:00
|
|
|
depends_on "go" => :build
|
|
|
|
|
|
|
|
def install
|
|
|
|
ENV["GOPATH"] = buildpath
|
|
|
|
(buildpath/"src/github.com/GoogleCloudPlatform").mkpath
|
|
|
|
ln_sf buildpath, buildpath/"src/github.com/GoogleCloudPlatform/container-diff"
|
|
|
|
|
|
|
|
cd "src/github.com/GoogleCloudPlatform/container-diff" do
|
|
|
|
system "make"
|
|
|
|
bin.install "out/container-diff"
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
test do
|
2018-03-02 11:25:36 +00:00
|
|
|
image = "daemon://gcr.io/google-appengine/golang:2018-01-04_15_24"
|
|
|
|
output = shell_output("#{bin}/container-diff analyze #{image} 2>&1", 1)
|
|
|
|
assert_match "Error loading image from docker engine", output
|
2018-01-10 17:51:56 +00:00
|
|
|
end
|
|
|
|
end
|