|
| 1 | +class Nova < Formula |
| 2 | + desc "Find outdated or deprecated Helm charts running in your cluster" |
| 3 | + homepage "https://github.com/FairwindsOps/nova" |
| 4 | + url "https://github.com/FairwindsOps/nova/archive/refs/tags/v3.11.3.tar.gz" |
| 5 | + sha256 "5f70b5a904c773190e104776a42afd9b798f682b7f1bafc12c27818120a94911" |
| 6 | + license "Apache-2.0" |
| 7 | + head "https://github.com/FairwindsOps/nova.git", branch: "master" |
| 8 | + |
| 9 | + bottle do |
| 10 | + sha256 cellar: :any_skip_relocation, arm64_sequoia: "19ce1ddbf6213ebb146cd2036bebafdea269c333f6292e36f13a22101c9bd5a1" |
| 11 | + sha256 cellar: :any_skip_relocation, arm64_sonoma: "19ce1ddbf6213ebb146cd2036bebafdea269c333f6292e36f13a22101c9bd5a1" |
| 12 | + sha256 cellar: :any_skip_relocation, arm64_ventura: "19ce1ddbf6213ebb146cd2036bebafdea269c333f6292e36f13a22101c9bd5a1" |
| 13 | + sha256 cellar: :any_skip_relocation, sonoma: "e4fd80c52ad1b119cb9b7e2482217be94e8967c59bc631220d94b96babaf905d" |
| 14 | + sha256 cellar: :any_skip_relocation, ventura: "e4fd80c52ad1b119cb9b7e2482217be94e8967c59bc631220d94b96babaf905d" |
| 15 | + sha256 cellar: :any_skip_relocation, x86_64_linux: "1e1784c91e78d8ec6667bbea4bd7bd46c266cdd3415f8b6703b1d3cdba697e30" |
| 16 | + end |
| 17 | + |
| 18 | + depends_on "go" => :build |
| 19 | + |
| 20 | + def install |
| 21 | + system "go", "build", *std_go_args(ldflags: "-s -w -X main.version=#{version} -X main.commit=#{tap.user}") |
| 22 | + |
| 23 | + generate_completions_from_executable(bin/"nova", "completion") |
| 24 | + end |
| 25 | + |
| 26 | + test do |
| 27 | + assert_match version.to_s, shell_output("#{bin}/nova version") |
| 28 | + |
| 29 | + system bin/"nova", "generate-config", "--config=nova.yaml" |
| 30 | + assert_match "chart-ignore-list: []", (testpath/"nova.yaml").read |
| 31 | + |
| 32 | + output = shell_output("#{bin}/nova find --helm 2>&1", 255) |
| 33 | + assert_match "try setting KUBERNETES_MASTER environment variable", output |
| 34 | + end |
| 35 | +end |
0 commit comments