-
Notifications
You must be signed in to change notification settings - Fork 59
/
Rakefile
38 lines (25 loc) · 793 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
def run(command)
system(command) or raise "RAKE TASK FAILED: #{command}"
end
$PROJECT = "PhotoSlider"
$WORKSPACE = "#{$PROJECT}.xcworkspace"
namespace 'clean' do
task :demo do
run "xcodebuild -workspace #{$WORKSPACE} -scheme #{$PROJECT}Demo clean"
end
task :framework do
run "xcodebuild -workspace #{$WORKSPACE} -scheme #{$PROJECT} clean"
end
end
namespace "build" do
desc "Build for all iOS targets"
task :ios do |task, args|
if ENV['DESTINATION']
destination = ENV['DESTINATION']
else
destination = 'platform=iOS Simulator,name=iPhone 6s'
end
run "xcodebuild -workspace #{$WORKSPACE} -scheme #{$PROJECT} -destination '#{destination}' -configuration Debug clean build TEST_AFTER_BUILD=YES "
end
end
task default: ["build:ios"]