homebrew-core/Formula/cromwell.rb
geoffjentry 1e25b319ce cromwell 0.17
Cromwell 0.17

Closes Homebrew/homebrew#48757.

Signed-off-by: Andrew Janke <andrew@apjanke.net>
2016-02-03 00:57:11 -05: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/0.17/cromwell-0.17.jar"
sha256 "324eb2de0336865e8f2e828353a13abc42312bf2dfe6dbc2c5dd2cf08b9fbef7"
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