forked from motion-kit/motion-kit
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRakefile
More file actions
39 lines (33 loc) · 1023 Bytes
/
Rakefile
File metadata and controls
39 lines (33 loc) · 1023 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
# -*- coding: utf-8 -*-
$:.unshift("/Library/RubyMotion/lib")
platform = ENV.fetch('platform', 'ios')
if platform == 'ios'
require 'motion/project/template/ios'
elsif platform == 'osx'
require 'motion/project/template/osx'
elsif platform == 'tvos'
require 'motion/project/template/tvos'
end
begin
require 'bundler'
Bundler.require
rescue LoadError
end
Motion::Project::App.setup do |app|
app.name = 'MotionKit'
app.identifier = 'com.motionkit.MotionKit'
if app.template == :ios
app.specs_dir = 'spec/ios/'
app.files.delete_if { |file| file =~ %r{app/osx/} }
app.files.delete_if { |file| file =~ %r{app/tvos/} }
elsif app.template == :osx
app.specs_dir = 'spec/osx/'
app.files.delete_if { |file| file =~ %r{app/ios/} }
app.files.delete_if { |file| file =~ %r{app/tvos/} }
elsif app.template == :tvos
app.specs_dir = 'spec/tvos/'
app.files.delete_if { |file| file =~ %r{app/ios/} }
app.files.delete_if { |file| file =~ %r{app/osx/} }
end
DBT.analyze(app)
end