-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathRakefile
51 lines (39 loc) · 1.02 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
require 'rubygems'
# Bootstrap
#-----------------------------------------------------------------------------#
desc "initializes your working copy"
task :bootstrap do
title "updating submodules"
execute_command "git submodule update --init --recursive"
title "installing gems"
execute_command "bundle install"
end
# Build
#-----------------------------------------------------------------------------#
desc "build slightly-after-dark"
task :build do
title "Building"
require 'xcoder'
config = Xcode.project('slightly-after-dark').target('slightly-after-dark').config(:Debug)
builder = config.builder
builder.clean
builder.build :sdk => :macosx
end
# Helpers
#-----------------------------------------------------------------------------#
def execute_command(command)
if ENV['VERBOSE']
sh(command)
else
output = `#{command} 2>&1`
raise output unless $?.success?
end
end
def title(title)
cyan_title = "\033[0;36m#{title}\033[0m"
puts
puts "-" * 80
puts cyan_title
puts "-" * 80
puts
end