Merge pull request #207012 from Homebrew/bump-tailwindcss-4.0.5
[Homebrew/homebrew-core.git] / Formula / t / talhelper.rb
blob2b514819072b4c1d9016d7cf1408d03297bca38b
1 class Talhelper < Formula
2   desc "Configuration helper for talos clusters"
3   homepage "https://budimanjojo.github.io/talhelper/latest/"
4   url "https://github.com/budimanjojo/talhelper/archive/refs/tags/v3.0.18.tar.gz"
5   sha256 "d05165c0a25c6ea6dc95c6ff1cb2d143ce172eb089b39512a0b842f22dd518dd"
6   license "BSD-3-Clause"
7   head "https://github.com/budimanjojo/talhelper.git", branch: "master"
9   bottle do
10     sha256 cellar: :any_skip_relocation, arm64_sequoia: "18fb63db1da3fdbcdbe50a2c9f0cd2588874d5cf5f968ddc5047b0c9222d9cdd"
11     sha256 cellar: :any_skip_relocation, arm64_sonoma:  "18fb63db1da3fdbcdbe50a2c9f0cd2588874d5cf5f968ddc5047b0c9222d9cdd"
12     sha256 cellar: :any_skip_relocation, arm64_ventura: "18fb63db1da3fdbcdbe50a2c9f0cd2588874d5cf5f968ddc5047b0c9222d9cdd"
13     sha256 cellar: :any_skip_relocation, sonoma:        "3896a4828052b6414768057556404bcbdf8a0cf41119755266d9644d51e8357b"
14     sha256 cellar: :any_skip_relocation, ventura:       "3896a4828052b6414768057556404bcbdf8a0cf41119755266d9644d51e8357b"
15     sha256 cellar: :any_skip_relocation, x86_64_linux:  "c16073f2c9b43122ad43323322cc25564a0ee8d6a725a538f793784828c29220"
16   end
18   depends_on "go" => :build
20   def install
21     ldflags = "-s -w -X github.com/budimanjojo/talhelper/v#{version.major}/cmd.version=#{version}"
22     system "go", "build", *std_go_args(ldflags:)
24     generate_completions_from_executable(bin/"talhelper", "completion")
25     pkgshare.install "example"
26   end
28   test do
29     cp_r Dir["#{pkgshare}/example/*"], testpath
31     output = shell_output("#{bin}/talhelper genconfig 2>&1", 1)
32     assert_match "failed to load env file: trying to decrypt talenv.yaml with sops", output
34     assert_match "cluster:", shell_output("#{bin}/talhelper gensecret")
36     assert_match version.to_s, shell_output("#{bin}/talhelper --version")
37   end
38 end