[RM-651] allow to run rake task other than `build' in Extension/Framework project

http://hipbyte.myjetbrains.com/youtrack/issue/RM-651
This commit is contained in:
Watson
2014-11-18 09:49:58 +09:00
parent c98d45b5b4
commit 4f809213e2
5 changed files with 10 additions and 8 deletions

2
NEWS
View File

@@ -12,6 +12,8 @@
will fail with crash.
* [iOS] Fixed a bug where #tap and #rotate_device cause a crash when it run
`rake spec' with x86_64.
* [iOS] Fixed a bug where all rake task could not be ran in root directory of
Extension/Framework. So, CocoaPods libraries cannot be installed.
* Fixed a bug where wrong Boxed object will be returned from Objective-C method.
* Fixed the `motion support' command invocation to print both the stable and
pre-release versions of RubyMotion.

View File

@@ -75,6 +75,10 @@ PLIST
end
def build(config, platform, opts)
unless ENV['RM_TARGET_BUILD']
App.fail "Extension targets must be built from an application project"
end
@host_app_dir = ENV['RM_TARGET_HOST_APP_PATH']
config.sdk_version = ENV['RM_TARGET_SDK_VERSION'] if ENV['RM_TARGET_SDK_VERSION']
config.deployment_target = ENV['RM_TARGET_DEPLOYMENT_TARGET'] if ENV['RM_TARGET_DEPLOYMENT_TARGET']

View File

@@ -29,10 +29,6 @@ require 'motion/util/version'
App = Motion::Project::App
App.template = :'ios-extension'
unless ENV['RM_TARGET_BUILD']
App.fail "Extension targets must be built from an application project"
end
require 'motion/project'
require 'motion/project/template/ios-extension-config'
require 'motion/project/template/ios-extension-builder'

View File

@@ -29,10 +29,6 @@ require 'motion/util/version'
App = Motion::Project::App
App.template = :'ios-framework'
unless ENV['RM_TARGET_BUILD']
App.fail "Framework targets must be built from an application project"
end
require 'motion/project'
require 'motion/project/template/ios-framework/config'
require 'motion/project/template/ios-framework/builder'

View File

@@ -28,6 +28,10 @@ require 'motion/project/builder'
module Motion; module Project
class Builder
def build(config, platform, opts)
unless ENV['RM_TARGET_BUILD']
App.fail "Framework targets must be built from an application project"
end
@host_app_dir = ENV['RM_TARGET_HOST_APP_PATH']
config.sdk_version = ENV['RM_TARGET_SDK_VERSION'] if ENV['RM_TARGET_SDK_VERSION']
config.deployment_target = ENV['RM_TARGET_DEPLOYMENT_TARGET'] if ENV['RM_TARGET_DEPLOYMENT_TARGET']