<commit_before>class MinioMc < Formula
  desc "Replacement for ls, cp and other commands for object storage"
  homepage "https://github.com/minio/mc"
  url "https://github.com/minio/mc.git",
      tag:      "RELEASE.2020-08-20T00-23-01Z",
      revision: "ebb05ce469d556657a03fa944b199460bc3ec66e"
  version "20200820002301"
  license "Apache-2.0"

  bottle do
    cellar :any_skip_relocation
    sha256 "c0004c068e4351ddb1d57c302742a57ecb33c74d7f60c7e80d239e0f688657a3" => :catalina
    sha256 "76479da8f371426d9e8060abe0728dc949386889f62e2a2bafba71069a790b6f" => :mojave
    sha256 "aa876b14400b462a0686ec12054e0c93b777b39b7e1252d2a7a21eddca7d263b" => :high_sierra
  end

  depends_on "go" => :build

  conflicts_with "midnight-commander", because: "both install an `mc` binary"

  def install
    if build.head?
      system "go", "build", "-trimpath", "-o", bin/"mc"
    else
      minio_release = `git tag --points-at HEAD`.chomp
      minio_version = minio_release.gsub(/RELEASE\./, "").chomp.gsub(/T(\d+)-(\d+)-(\d+)Z/, 'T\1:\2:\3Z')
      minio_commit = `git rev-parse HEAD`.chomp
      proj = "github.com/minio/mc"

      system "go", "build", "-trimpath", "-o", bin/"mc", "-ldflags", <<~EOS
        -X #{proj}/cmd.Version=#{minio_version}
        -X #{proj}/cmd.ReleaseTag=#{minio_release}
        -X #{proj}/cmd.CommitID=#{minio_commit}
      EOS
    end
  end

  test do
    system bin/"mc", "mb", testpath/"test"
    assert_predicate testpath/"test", :exist?
  end
end
<commit_msg>minio-mc 20200903000828<commit_after>class MinioMc < Formula
  desc "Replacement for ls, cp and other commands for object storage"
  homepage "https://github.com/minio/mc"
  url "https://github.com/minio/mc.git",
      tag:      "RELEASE.2020-09-03T00-08-28Z",
      revision: "f99232260606ae4a6ef16613838d202765efa18c"
  version "20200903000828"
  license "Apache-2.0"

  bottle do
    cellar :any_skip_relocation
    sha256 "c0004c068e4351ddb1d57c302742a57ecb33c74d7f60c7e80d239e0f688657a3" => :catalina
    sha256 "76479da8f371426d9e8060abe0728dc949386889f62e2a2bafba71069a790b6f" => :mojave
    sha256 "aa876b14400b462a0686ec12054e0c93b777b39b7e1252d2a7a21eddca7d263b" => :high_sierra
  end

  depends_on "go" => :build

  conflicts_with "midnight-commander", because: "both install an `mc` binary"

  def install
    if build.head?
      system "go", "build", "-trimpath", "-o", bin/"mc"
    else
      minio_release = `git tag --points-at HEAD`.chomp
      minio_version = minio_release.gsub(/RELEASE\./, "").chomp.gsub(/T(\d+)-(\d+)-(\d+)Z/, 'T\1:\2:\3Z')
      minio_commit = `git rev-parse HEAD`.chomp
      proj = "github.com/minio/mc"

      system "go", "build", "-trimpath", "-o", bin/"mc", "-ldflags", <<~EOS
        -X #{proj}/cmd.Version=#{minio_version}
        -X #{proj}/cmd.ReleaseTag=#{minio_release}
        -X #{proj}/cmd.CommitID=#{minio_commit}
      EOS
    end
  end

  test do
    system bin/"mc", "mb", testpath/"test"
    assert_predicate testpath/"test", :exist?
  end
end

{'fraction_non_alphanumeric': 0.14709806537691794, 'fraction_numerical': 0.13542361574382922, 'mean_word_length': 3.5233785822021115, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 11, 'https://': 4, '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': '1312372', 'n_tokens_mistral': 1451, 'n_tokens_neox': 1215, 'n_words': 211}