<commit_before>class Goreleaser < Formula
  desc "Deliver Go binaries as fast and easily as possible"
  homepage "https://goreleaser.com/"
  url "https://github.com/goreleaser/goreleaser.git",
      tag:      "v1.2.4",
      revision: "cdcaf038c840247531576a8dd50f30e1615a988c"
  license "MIT"
  head "https://github.com/goreleaser/goreleaser.git", branch: "master"

  bottle do
    sha256 cellar: :any_skip_relocation, arm64_monterey: "759776639fb67a1aed628cb8f46e78071ddd010515bac126f108041aad005612"
    sha256 cellar: :any_skip_relocation, arm64_big_sur:  "f39b8ab8ea03bd86623e1d5f3e3d0aa2a182fa8820429b84a387245d3712fdda"
    sha256 cellar: :any_skip_relocation, monterey:       "2b34a59890f0a5668cab5f18708f884d61ed1f93c6129877d368ed829d6b4bcf"
    sha256 cellar: :any_skip_relocation, big_sur:        "16c8773886f985fed149324a0f71e67f1d41396bd46afbf74d769b482666e22c"
    sha256 cellar: :any_skip_relocation, catalina:       "7bcfb100e36f088ef17e5c5449e3559c669b6f8620d275d4ce7cde369c9408c9"
    sha256 cellar: :any_skip_relocation, x86_64_linux:   "f1808dfbe83c46c94d39846943657d5c2cd4b138b5f3701d791a6c77b2811906"
  end

  depends_on "go" => :build

  def install
    ldflags = %W[
      -s -w
      -X main.version=#{version}
      -X main.commit=#{Utils.git_head}
      -X main.builtBy=homebrew
    ]

    system "go", "build", *std_go_args(ldflags: ldflags)

    # Install shell completions
    output = Utils.safe_popen_read("#{bin}/goreleaser", "completion", "bash")
    (bash_completion/"goreleaser").write output

    output = Utils.safe_popen_read("#{bin}/goreleaser", "completion", "zsh")
    (zsh_completion/"_goreleaser").write output

    output = Utils.safe_popen_read("#{bin}/goreleaser", "completion", "fish")
    (fish_completion/"goreleaser.fish").write output
  end

  test do
    assert_match version.to_s, shell_output("#{bin}/goreleaser -v 2>&1")
    assert_match "config created", shell_output("#{bin}/goreleaser init --config=.goreleaser.yml 2>&1")
    assert_predicate testpath/".goreleaser.yml", :exist?
  end
end
<commit_msg>goreleaser 1.2.5<commit_after>class Goreleaser < Formula
  desc "Deliver Go binaries as fast and easily as possible"
  homepage "https://goreleaser.com/"
  url "https://github.com/goreleaser/goreleaser.git",
      tag:      "v1.2.5",
      revision: "bbd79a11a7c06b6ef3121d0c4a8820122c2d2489"
  license "MIT"
  head "https://github.com/goreleaser/goreleaser.git", branch: "master"

  bottle do
    sha256 cellar: :any_skip_relocation, arm64_monterey: "759776639fb67a1aed628cb8f46e78071ddd010515bac126f108041aad005612"
    sha256 cellar: :any_skip_relocation, arm64_big_sur:  "f39b8ab8ea03bd86623e1d5f3e3d0aa2a182fa8820429b84a387245d3712fdda"
    sha256 cellar: :any_skip_relocation, monterey:       "2b34a59890f0a5668cab5f18708f884d61ed1f93c6129877d368ed829d6b4bcf"
    sha256 cellar: :any_skip_relocation, big_sur:        "16c8773886f985fed149324a0f71e67f1d41396bd46afbf74d769b482666e22c"
    sha256 cellar: :any_skip_relocation, catalina:       "7bcfb100e36f088ef17e5c5449e3559c669b6f8620d275d4ce7cde369c9408c9"
    sha256 cellar: :any_skip_relocation, x86_64_linux:   "f1808dfbe83c46c94d39846943657d5c2cd4b138b5f3701d791a6c77b2811906"
  end

  depends_on "go" => :build

  def install
    ldflags = %W[
      -s -w
      -X main.version=#{version}
      -X main.commit=#{Utils.git_head}
      -X main.builtBy=homebrew
    ]

    system "go", "build", *std_go_args(ldflags: ldflags)

    # Install shell completions
    output = Utils.safe_popen_read("#{bin}/goreleaser", "completion", "bash")
    (bash_completion/"goreleaser").write output

    output = Utils.safe_popen_read("#{bin}/goreleaser", "completion", "zsh")
    (zsh_completion/"_goreleaser").write output

    output = Utils.safe_popen_read("#{bin}/goreleaser", "completion", "fish")
    (fish_completion/"goreleaser.fish").write output
  end

  test do
    assert_match version.to_s, shell_output("#{bin}/goreleaser -v 2>&1")
    assert_match "config created", shell_output("#{bin}/goreleaser init --config=.goreleaser.yml 2>&1")
    assert_predicate testpath/".goreleaser.yml", :exist?
  end
end

{'fraction_non_alphanumeric': 0.11059907834101383, 'fraction_numerical': 0.1532864419112297, 'mean_word_length': 4.841359773371105, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, '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': '5681440', 'n_tokens_mistral': 2053, 'n_tokens_neox': 1687, 'n_words': 243}