<commit_before>class Artifactory < Formula
  desc "Manages binaries"
  homepage "https://www.jfrog.com/artifactory/"
  url "https://dl.bintray.com/jfrog/artifactory/jfrog-artifactory-oss-6.23.13.zip"
  sha256 "0889c11b768a4b1a6bfb6939280c24e5bd22b36bc3438481b0b420443eb5f379"
  license "AGPL-3.0-or-later"
  livecheck do
    url "https://dl.bintray.com/jfrog/artifactory/"
    regex(/href=.*?jfrog-artifactory-oss[._-]v?(\d+(?:\.\d+)+)\.zip/i)
  end

  bottle do
    sha256 cellar: :any_skip_relocation, arm64_big_sur: "b601b9bec08834496b2412d3255548ad0f03d3a0305a1c8d879e3735b0d695f5"
    sha256 cellar: :any_skip_relocation, big_sur:       "1e63e1246239ddcbc0ad1120731b0631d03fab85a546457de4003036a2cb38bf"
    sha256 cellar: :any_skip_relocation, catalina:      "1e63e1246239ddcbc0ad1120731b0631d03fab85a546457de4003036a2cb38bf"
    sha256 cellar: :any_skip_relocation, mojave:        "1e63e1246239ddcbc0ad1120731b0631d03fab85a546457de4003036a2cb38bf"
  end

  depends_on "openjdk"

  def install
    # Remove Windows binaries
    rm_f Dir["bin/*.bat"]
    rm_f Dir["bin/*.exe"]

    # Set correct working directory
    inreplace "bin/artifactory.sh",
      'export ARTIFACTORY_HOME="$(cd "$(dirname "${artBinDir}")" && pwd)"',
      "export ARTIFACTORY_HOME=#{libexec}"

    libexec.install Dir["*"]

    # Launch Script
    bin.install libexec/"bin/artifactory.sh"
    # Memory Options
    bin.install libexec/"bin/artifactory.default"

    bin.env_script_all_files libexec/"bin", JAVA_HOME: Formula["openjdk"].opt_prefix<commit_msg>artifactory 6.23.15<commit_after>class Artifactory < Formula
  desc "Manages binaries"
  homepage "https://www.jfrog.com/artifactory/"
  # v7 is available but does contain a number of pre-builts that need to be avoided.
  # Note that just using the source archive is not sufficient.
  url "https://releases.jfrog.io/artifactory/bintray-artifactory/org/artifactory/oss/jfrog-artifactory-oss/6.23.15/jfrog-artifactory-oss-6.23.15.zip"
  sha256 "c342b9949aa42d928f25704105fd9f522835e9344e56ecc24e63a899c2948041"
  license "AGPL-3.0-or-later"

  livecheck do
    url "https://releases.jfrog.io/artifactory/bintray-artifactory/org/artifactory/oss/jfrog-artifactory-oss/"
    regex(/href=.*?v?(\d+(?:\.\d+)+)/i)
  end

  bottle do
    sha256 cellar: :any_skip_relocation, arm64_big_sur: "b601b9bec08834496b2412d3255548ad0f03d3a0305a1c8d879e3735b0d695f5"
    sha256 cellar: :any_skip_relocation, big_sur:       "1e63e1246239ddcbc0ad1120731b0631d03fab85a546457de4003036a2cb38bf"
    sha256 cellar: :any_skip_relocation, catalina:      "1e63e1246239ddcbc0ad1120731b0631d03fab85a546457de4003036a2cb38bf"
    sha256 cellar: :any_skip_relocation, mojave:        "1e63e1246239ddcbc0ad1120731b0631d03fab85a546457de4003036a2cb38bf"
  end

  depends_on "openjdk"

  def install
    # Remove Windows binaries
    rm_f Dir["bin/*.bat"]
    rm_f Dir["bin/*.exe"]

    # Prebuilts
    rm_rf "bin/metadata"

    # Set correct working directory
    inreplace "bin/artifactory.sh",
      'export ARTIFACTORY_HOME="$(cd "$(dirname "${artBinDir}")" && pwd)"',
      "export ARTIFACTORY_HOME=#{libexec}"

    libexec.install Dir["*"]

    # Launch Script
    bin.install libexec/"bin/artifactory.sh"
    # Memory Options
    bin.install libexec/"bin/artifactory.default"

    bin.env_script_all_files libexec/"bin", JAVA_HOME: Formula["openjdk"].opt_prefix
{'fraction_non_alphanumeric': 0.11520190023752969, 'fraction_numerical': 0.14608076009501186, 'mean_word_length': 4.504901960784314, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 6, 'lorem ipsum': 0, 'www.': 2, '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': '1319916', 'n_tokens_mistral': 1651, 'n_tokens_neox': 1363, 'n_words': 190}