<commit_before>class Werf < Formula
  desc "Consistent delivery tool for Kubernetes"
  homepage "https://werf.io/"
  url "https://github.com/werf/werf/archive/refs/tags/v1.2.177.tar.gz"
  sha256 "c0f8230371e8bce02b4c07d3d98095851723db1d2bb138432406bebf8ec7b001"
  license "Apache-2.0"
  head "https://github.com/werf/werf.git", branch: "main"

  # This repository has some tagged versions that are higher than the newest
  # stable release (e.g., `v1.5.2`) and the `GithubLatest` strategy is
  # currently necessary to identify the correct latest version.
  livecheck do
    url :stable
    strategy :github_latest
  end

  bottle do
    sha256 cellar: :any_skip_relocation, arm64_monterey: "60d6cc7c3e80a507d2118aca987176736ae73c4355f7d5de7e0efec93c9c185a"
    sha256 cellar: :any_skip_relocation, arm64_big_sur:  "9ed6bf0c0698e802926f107404f4cd4238500dec0aebcffc9f6161e86e539771"
    sha256 cellar: :any_skip_relocation, monterey:       "5d9702ab54f33d674a19cee1f1dcdfd0dc339d96c28cd81dec643162cf6f2f5d"
    sha256 cellar: :any_skip_relocation, big_sur:        "1baadee04f2642f009fbc3c339e64825bbda122cad2916853b5018996f70217c"
    sha256 cellar: :any_skip_relocation, catalina:       "15eabb8fa18a3f4edb27ee93dcbef0e0f406904caef392ae08a333b861f56972"
  end

  depends_on "go" => :build
  # due to missing libbtrfs headers, only supports macos at the moment
  depends_on :macos

  def install
    ldflags = "-s -w -X github.com/werf/werf/pkg/werf.Version=#{version}"
    tags = "dfrunmount dfssh containers_image_openpgp"

    system "go", "build", *std_go_args(ldflags: ldflags), "-tags", tags, "./cmd/werf"

    generate_completions_from_executable(bin/"werf", "completion")
  end

  test do
    werf_config = testpath/"werf.yaml"
    werf_config.write <<~EOS
      configVersion: 1
      project: quickstart-application
      ---
      image: vote
      dockerfile: Dockerfile
      context: vote
      ---<commit_msg>werf: update 1.2.177 bottle.<commit_after>class Werf < Formula
  desc "Consistent delivery tool for Kubernetes"
  homepage "https://werf.io/"
  url "https://github.com/werf/werf/archive/refs/tags/v1.2.177.tar.gz"
  sha256 "c0f8230371e8bce02b4c07d3d98095851723db1d2bb138432406bebf8ec7b001"
  license "Apache-2.0"
  head "https://github.com/werf/werf.git", branch: "main"

  # This repository has some tagged versions that are higher than the newest
  # stable release (e.g., `v1.5.2`) and the `GithubLatest` strategy is
  # currently necessary to identify the correct latest version.
  livecheck do
    url :stable
    strategy :github_latest
  end

  bottle do
    sha256 cellar: :any_skip_relocation, arm64_monterey: "c4d1213bfbadb9ea679e9932acf436868dc6ed7931e6e5edd9e24e79078d29d4"
    sha256 cellar: :any_skip_relocation, arm64_big_sur:  "3d0a4125fe79a7a984ba348697ac40a3af841149ed347ee17b176eb72da4718f"
    sha256 cellar: :any_skip_relocation, monterey:       "473bdf16a9cf6c100215e5bface62845d032dc125770abef7a04e8d3930a1be1"
    sha256 cellar: :any_skip_relocation, big_sur:        "e081a0e50733cd8e586a869dad93b7d9737a19558b23ccfc223e29361867f798"
    sha256 cellar: :any_skip_relocation, catalina:       "3dd80f9c139fe348b7218205db99b2f998bf19b23f871dfd05f41bf09380ee30"
  end

  depends_on "go" => :build
  # due to missing libbtrfs headers, only supports macos at the moment
  depends_on :macos

  def install
    ldflags = "-s -w -X github.com/werf/werf/pkg/werf.Version=#{version}"
    tags = "dfrunmount dfssh containers_image_openpgp"

    system "go", "build", *std_go_args(ldflags: ldflags), "-tags", tags, "./cmd/werf"

    generate_completions_from_executable(bin/"werf", "completion")
  end

  test do
    werf_config = testpath/"werf.yaml"
    werf_config.write <<~EOS
      configVersion: 1
      project: quickstart-application
      ---
      image: vote
      dockerfile: Dockerfile
      context: vote
      ---
{'fraction_non_alphanumeric': 0.09013209013209013, 'fraction_numerical': 0.14167314167314168, 'mean_word_length': 4.2831737346101235, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 5, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7341608', 'n_tokens_mistral': 1803, 'n_tokens_neox': 1501, 'n_words': 281}