<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.2018-12-05T22-59-07Z",
      :revision => "f3eaa54a32f3f48c340e6c48e9960b294e5cc670"
  version "20181205225907"

  bottle do
    cellar :any_skip_relocation
    sha256 "f9ecc88363b54970c74d6445a10ea0a6fc3af62b33a8e2d1ff77f6f6b45d6048" => :mojave
    sha256 "7135465a15873c1d8833a0340d38d541d678a29ef396fcdd8d67aa06f781ef75" => :high_sierra
    sha256 "92b450dfa4c72744c89cd18c1b58576bc441ae34b7ae2b497f347e8c9661912e" => :sierra
  end

  depends_on "go" => :build

  conflicts_with "midnight-commander", :because => "Both install a `mc` binary"

  def install
    ENV["GOPATH"] = buildpath

    clipath = buildpath/"src/github.com/minio/mc"
    clipath.install Dir["*"]

    cd clipath do
      if build.head?
        system "go", "build", "-o", buildpath/"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", "-o", buildpath/"mc", "-ldflags", <<~EOS
          -X #{proj}/cmd.Version=#{minio_version}
          -X #{proj}/cmd.ReleaseTag=#{minio_release}
          -X #{proj}/cmd.CommitID=#{minio_commit}
        EOS
      end
    end

    bin.install buildpath/"mc"
    prefix.install_metafiles
  end

  test do
    system bin/"mc", "mb", testpath/"test"
    assert_predicate testpath/"test", :exist?
  end
end
<commit_msg>minio-mc: update 20181205225907 bottle for Linuxbrew.<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.2018-12-05T22-59-07Z",
      :revision => "f3eaa54a32f3f48c340e6c48e9960b294e5cc670"
  version "20181205225907"

  bottle do
    cellar :any_skip_relocation
    sha256 "f9ecc88363b54970c74d6445a10ea0a6fc3af62b33a8e2d1ff77f6f6b45d6048" => :mojave
    sha256 "7135465a15873c1d8833a0340d38d541d678a29ef396fcdd8d67aa06f781ef75" => :high_sierra
    sha256 "92b450dfa4c72744c89cd18c1b58576bc441ae34b7ae2b497f347e8c9661912e" => :sierra
    sha256 "17b41e72fcfece5add0a33f96dc4c4c4073af638a77ea9aeebccc9b8d6e883c7" => :x86_64_linux
  end

  depends_on "go" => :build

  conflicts_with "midnight-commander", :because => "Both install a `mc` binary"

  def install
    ENV["GOPATH"] = buildpath

    clipath = buildpath/"src/github.com/minio/mc"
    clipath.install Dir["*"]

    cd clipath do
      if build.head?
        system "go", "build", "-o", buildpath/"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", "-o", buildpath/"mc", "-ldflags", <<~EOS
          -X #{proj}/cmd.Version=#{minio_version}
          -X #{proj}/cmd.ReleaseTag=#{minio_release}
          -X #{proj}/cmd.CommitID=#{minio_commit}
        EOS
      end
    end

    bin.install buildpath/"mc"
    prefix.install_metafiles
  end

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

{'fraction_non_alphanumeric': 0.138912610304583, 'fraction_numerical': 0.12297181895815543, 'mean_word_length': 3.243961352657005, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 18, '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': '189442', 'n_tokens_mistral': 1646, 'n_tokens_neox': 1397, 'n_words': 236}