lib/susanoo/cli/project_interface/build.rb in susanoo-0.12.1 vs lib/susanoo/cli/project_interface/build.rb in susanoo-0.12.2

- old
+ new

@@ -7,10 +7,12 @@ included do map 'b' => :build desc 'build [PLATFORM]', 'Build the application for given PLATFORM (default=android).' + method_option :complete, default: false + method_option :release, default: false def build(platform = 'android') require File.join(project_root, 'config/routes') router = ROUTER.instance_variable_get('@router') @@ -41,9 +43,16 @@ else say_status 'warning', "#{controller.__getobj__.class.to_s}' does not have 'build' method.", :yellow end end + + if options[:complete] + debug_flag = '--debug' + debug_flag = '--release' if options[:release] + system "cordova build #{platform.to_s} #{debug_flag}" + end + end end end end end