-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathparanoia.rb
More file actions
32 lines (28 loc) · 1.45 KB
/
paranoia.rb
File metadata and controls
32 lines (28 loc) · 1.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
class Paranoia < Formula
desc "Inspect certificate authorites in contianer images"
homepage "https://github.com/jetstack/paranoia"
url "https://github.com/jetstack/paranoia/archive/refs/tags/v0.5.0.tar.gz"
sha256 "44d894d9aa0763a1215a63385afc099676f3fbca5a975000d6a7f80a79279bf6"
license "Apache-2.0"
head "https://github.com/jetstack/paranoia.git", branch: "main"
bottle do
root_url "https://github.com/jetstack/homebrew-jetstack/releases/download/paranoia-0.5.0"
sha256 cellar: :any_skip_relocation, monterey: "1cc33c6743000b8adfc2fddb8dc2d6dbb21bcc6588a445a05b6c6656a0715856"
sha256 cellar: :any_skip_relocation, x86_64_linux: "4adeabcb93c1f13da12ffee63f373604e213a9bbd9fdfb9e4fd40ef436dda792"
end
depends_on "go" => :build
def install
system "go", "build", *std_go_args(ldflags: "-s -w")
# Generate and then install man pages
system "go", "run", "./hack/generate-manual"
man1.install Pathname.glob("man/*.1")
# Use the binary to generate shell completions
generate_completions_from_executable("#{bin}/paranoia", "completion")
end
test do
# This string is the SHA256 of the "ISRG X1 Root" certificate. This test verifies that
# paranoia can find that certificate in a known image (cert-manager v1.9.1).
assert_match "96bcec06264976f37460779acf28c5a7cfe8a3c0aae11a8ffcee05c0bddf08c6",
shell_output("#{bin}/paranoia export --output wide quay.io/jetstack/cert-manager-controller:v1.9.1")
end
end