homebrew-core/Formula/cromwell.rb
ilovezfs cc707d85e4 cromwell 23
Closes #7505.

Signed-off-by: ilovezfs <ilovezfs@icloud.com>
2016-12-03 06:51:37 -08:00

56 lines
1.3 KiB
Ruby

class Cromwell < Formula
desc "Workflow Execution Engine using Workflow Description Language"
homepage "https://github.com/broadinstitute/cromwell"
url "https://github.com/broadinstitute/cromwell/releases/download/23/cromwell-23.jar"
sha256 "c27c201f0cb295c1426ba56861adf97f1d15094ffffb77851cfb7425d1145437"
head do
url "https://github.com/broadinstitute/cromwell.git"
depends_on "sbt" => :build
end
bottle :unneeded
depends_on :java => "1.8+"
depends_on "akka"
def install
if build.head?
system "sbt", "assembly"
libexec.install Dir["target/scala-*/cromwell-*.jar"][0]
bin.write_jar_script Dir[libexec/"cromwell-*.jar"][0], "cromwell"
else
libexec.install "cromwell-#{version}.jar"
bin.write_jar_script libexec/"cromwell-#{version}.jar", "cromwell"
end
end
test do
(testpath/"hello.wdl").write <<-EOS
task hello {
String name
command {
echo 'hello ${name}!'
}
output {
File response = stdout()
}
}
workflow test {
call hello
}
EOS
(testpath/"hello.json").write <<-EOS
{
"test.hello.name": "world"
}
EOS
result = shell_output("#{bin}/cromwell run hello.wdl hello.json")
assert_match "test_hello_response", result
end
end