-
Notifications
You must be signed in to change notification settings - Fork 5
/
Rakefile
50 lines (46 loc) · 1.53 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
require "mkmf"
require 'cli/ui'
require "open3"
def execute(command)
return_value = nil
Open3.popen3(command) do |stdin, stdout, stderr, wait_thr|
while line=stdout.gets do
puts(line)
end
while line = stderr.gets do
puts(line)
end
return_value = wait_thr.value
end
abort unless return_value.success?
end
desc "Fetches all Carthage dependencies"
task :dependencies do
CLI::UI::StdoutRouter.enable
CLI::UI::Frame.open('🤪 Carthage dependencies') do
execute("carthage update --platform iOS")
end
end
desc "Build the iOS app"
task :build_ios do
CLI::UI::StdoutRouter.enable
CLI::UI::Frame.open('Build iOS app 🐸') do
execute("xcodebuild -workspace Projects/Issues.xcworkspace -scheme App -configuration Debug | xcpretty")
end
end
desc "Generates Xcode projects"
task :generate_projects do
CLI::UI::StdoutRouter.enable
CLI::UI::Frame.open('Generating GitHubKit project 🦁') do
execute("xcodegen --spec Projects/GitHubKit/project.yml --project Projects/GitHubKit/")
end
CLI::UI::Frame.open('Generating IssuesKit project 🦁') do
execute("xcodegen --spec Projects/IssuesKit/project.yml --project Projects/IssuesKit/")
end
CLI::UI::Frame.open('Generating App project 🦁') do
execute("xcodegen --spec Projects/App/project.yml --project Projects/App/")
end
CLI::UI::Frame.open('Generating IssuesUI project 🦁') do
execute("xcodegen --spec Projects/IssuesUI/project.yml --project Projects/IssuesUI/")
end
end