homebrew-core/Formula/cromwell.rb
2017-08-16 22:54:36 +02:00

55 lines
1.2 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/29/cromwell-29.jar"
sha256 "97445b6d75bc294e4a96be330ef5231688789bde62f4cd8a139e182ef18c3933"
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]
else
libexec.install Dir["cromwell-*.jar"][0]
end
bin.write_jar_script Dir[libexec/"cromwell-*.jar"][0], "cromwell"
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 --inputs hello.json hello.wdl")
assert_match "test.hello.response", result
end
end