-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRakefile
More file actions
49 lines (33 loc) · 785 Bytes
/
Rakefile
File metadata and controls
49 lines (33 loc) · 785 Bytes
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
task :default => [:generate]
# Generate all
task :generate => [:generate_thumbs, :generate_html]
# Thumb generation
IMAGES = FileList['images/*/*.png']
THUMBS = IMAGES.pathmap("%{^images,thumbs}d/%n%x")
THUMBS.zip(IMAGES).each do |dest, src|
file dest => src do
ruby "thumb.rb #{src} #{dest}"
end
end
task :generate_thumbs => THUMBS
# HTML compilation
COMPETITIONS = FileList['competitions/*.yml']
HTML = COMPETITIONS.ext('html')
rule '.html' => '.yml' do |t|
ruby "generate.rb #{t.source}"
end
file "competitions.html" => COMPETITIONS do
ruby "generate_main.rb"
end
task :generate_html => HTML.concat(["competitions.html"])
# Rackup
task :deploy do
system %{rackup}
end
# Clean
task :clean do
rm_f HTML
end
task :clobber => :clean do
rm_f THUMBS
end