forked from Homebrew/homebrew-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcromwell.rb
56 lines (46 loc) · 1.32 KB
/
cromwell.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
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.19.3/cromwell-0.19.3.jar"
sha256 "982f86f061b6391ffe2a05ebab193289e760b169cde1362e5cb420e1ebb2392f"
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