69 lines
1.9 KiB
Ruby
69 lines
1.9 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/83/cromwell-83.jar"
|
|
sha256 "bc556fe10cf4798617786fd41533dc06a53941c6ecb849b7b6c6c550220f40c1"
|
|
license "BSD-3-Clause"
|
|
|
|
bottle do
|
|
sha256 cellar: :any_skip_relocation, all: "00ff6bef7c8fc31647e0bd7f937ab07234f6f632dd8c68e435f7c40a28854d75"
|
|
end
|
|
|
|
head do
|
|
url "https://github.com/broadinstitute/cromwell.git", branch: "develop"
|
|
depends_on "sbt" => :build
|
|
end
|
|
|
|
depends_on "openjdk"
|
|
|
|
resource "womtool" do
|
|
url "https://github.com/broadinstitute/cromwell/releases/download/83/womtool-83.jar"
|
|
sha256 "a1f941da233e06d0a4c261ec3eae91bc62fba5dad200dae0f1e2527672ac58c0"
|
|
end
|
|
|
|
def install
|
|
if build.head?
|
|
system "sbt", "assembly"
|
|
libexec.install Dir["server/target/scala-*/cromwell-*.jar"][0] => "cromwell.jar"
|
|
libexec.install Dir["womtool/target/scala-*/womtool-*.jar"][0] => "womtool.jar"
|
|
else
|
|
libexec.install "cromwell-#{version}.jar" => "cromwell.jar"
|
|
resource("womtool").stage do
|
|
libexec.install "womtool-#{version}.jar" => "womtool.jar"
|
|
end
|
|
end
|
|
|
|
bin.write_jar_script libexec/"cromwell.jar", "cromwell", "$JAVA_OPTS"
|
|
bin.write_jar_script libexec/"womtool.jar", "womtool"
|
|
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
|