-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathRakefile
38 lines (33 loc) · 818 Bytes
/
Rakefile
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
DIRS = %w(
ncode-syosetu-core
ncode-syosetu-epub3
ncode-syosetu-mobi
ncode-syosetu-ssml
ncode-syosetu-polly
ncode-syosetu
)
DIRS.each do |dir|
%w(install spec release).each do |task_name|
desc "#{dir}: rake #{task_name}"
task "#{dir}:#{task_name}" do
Dir.chdir(dir) do
sh "bundle", "exec", "rake", task_name.to_s
end
end
end
desc "#{dir}: bundle:install"
task "#{dir}:bundle:install" do
Dir.chdir(dir) do
sh "bundle", "install"
end
end
end
namespace :all do
%w(install spec release bundle:install).each do |task_name|
desc "#{task_name}"
task task_name => DIRS.map{|dir| "#{dir}:#{task_name}" }
end
end
desc "install"
task "install" => DIRS.map{|dir| ["#{dir}:bundle:install", "#{dir}:install"] }.flatten
task :default => "all:spec"