forked from soffes/cheddar-ios
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
55 lines (45 loc) · 1.42 KB
/
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
class String
def self.colorize(text, color_code)
"\e[#{color_code}m#{text}\e[0m"
end
def cyan
self.class.colorize(self, 36)
end
def green
self.class.colorize(self, 32)
end
end
desc 'Update and initialize the submodules'
task :update_submodules do
puts 'Updating submodules...'.cyan
`git submodule update --init --recursive`
end
desc 'Setup with example files and dummy fonts'
task :setup => :update_submodules do
# Copy examples defines
puts 'Copying example CDIDefines into place...'.cyan
`cp Other\\ Sources/CDIDefinesExample.h Other\\ Sources/CDIDefines.h`
`cp Other\\ Sources/CDIDefinesExample.m Other\\ Sources/CDIDefines.m`
# Make placeholder fonts
puts 'Creating dummy fonts...'.cyan
`mkdir -p Resources/Fonts`
`touch Resources/Fonts/Gotham-Bold.otf`
`touch Resources/Fonts/Gotham-BoldItalic.otf`
`touch Resources/Fonts/Gotham-Book.otf`
`touch Resources/Fonts/Gotham-BookItalic.otf`
# Done!
puts 'Done! You\'re ready to get started!'.green
end
# Run setup by default
task :default => :setup
desc 'Setup with private files'
task :'setup:private' => :update_submodules do
# Copy defines
puts 'Copying example CDIDefines into place...'.cyan
`cp ../cheddar-private/iOS/CDIDefines.* Other\\ Sources/`
# Make placeholder fonts
puts 'Coping Gotham...'.cyan
`cp -R ../cheddar-private/Resources/Fonts Resources/`
# Done!
puts 'Done! You\'re ready to get started!'.green
end