[ 
https://issues.apache.org/jira/browse/IGNITE-17914?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17637829#comment-17637829
 ] 

Aleksandr commented on IGNITE-17914:
------------------------------------

Decided to wait for the stable Ignite 3 and publish it then. Here are the 
formulas I've developed so far.


{code:java}
class Ignite3Cli < Formula
  desc "Apache Ignite 3 Command Line Tool"
  homepage "https://ignite.apache.org";
  url "https://dlcdn.apache.org/ignite/3.0.0-beta1/ignite3-cli-3.0.0-beta1.zip";
  sha256 "526d492d93b483cb4cc5b2b1d00190866f1883fcfe9e5104244dc3d5c0e26a87"

  license ""

  depends_on "openjdk@11"

  def install
    rm_f Dir["bin/*.bat"]

    libexec.install "lib"
    libexec.install "bin"
    bin.install_symlink libexec/"bin/ignite3"
    bash_completion.install libexec/"bin/ignite_completion.sh" => "ignite3"
  end

  def caveats
    <<~EOS
      Add the following line to your ~/.bash_profile or ~/.zshrc:
       source /usr/local/etc/bash_completion.d/ignite3
    EOS
  end

  test do
    system "#{bin}/ignite3", "--help"
  end
end
{code}


{code:java}
class Ignite3db < Formula
  desc ""
  homepage ""
  url "file:///Users/apakhomov/brew-tests/ignite3-db-3.0.0-beta1.zip"
  sha256 "0bead985b19b7dffd06924672d438d3b3a2ce5e4da1dac68b28b653f44ac2d20"
  license ""


  def install
    lib.install Dir["lib/*.jar"]
    bin.install "bin/ignite3db"
    (prefix/"etc/").install Dir["etc/*"]
    (var/"log/#{name}").mkpath
    (var/"#{name}/work").mkpath

    inreplace "#{bin}/ignite3db" do |s|
      s.gsub! " exec ${CMD} >>${LOG_OUT_FILE:-/dev/null} 2>&1 < /dev/null & 
jobs -p > ${IGNITE_HOME}/pid", " exec ${CMD}"
    end

    inreplace "#{prefix/"etc"}/bootstrap-config.env" do |s|
      s.gsub! "WORK_PATH=$IGNITE_HOME/work", "WORK_PATH=#{var}/#{name}/work"
    end

    inreplace "#{prefix/"etc"}/ignite.java.util.logging.properties" do |s|
      s.gsub! "java.util.logging.FileHandler.pattern = ./ignite3db-%g.log", 
"java.util.logging.FileHandler.pattern = #{var}/log/#{name}/ignite3db-%g.log"
    end
  end

  test do
    system "true"
  end

  def ignite3_db_log_path
    var/"log/ignite3-db/#{name}.log"
  end

  service do
    #environment_variables IGNITE_HOME: opt_prefix
    run [opt_bin/"ignite3db", "start"]
    keep_alive true
    log_path f.ignite3_db_log_path
    error_log_path f.ignite3_db_log_path
    working_dir opt_prefix
  end
end
{code}



> Create PR to homebrew-core
> --------------------------
>
>                 Key: IGNITE-17914
>                 URL: https://issues.apache.org/jira/browse/IGNITE-17914
>             Project: Ignite
>          Issue Type: Task
>          Components: build, cli
>            Reporter: Aleksandr
>            Assignee: Aleksandr
>            Priority: Major
>              Labels: ignite-3
>
> In IGNITE-17489 two homebrew formulas were developed. They have to be merged 
> to the homebrew-core module after beta1 is available with url.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to