Skip to content
This repository has been archived by the owner on Jun 20, 2021. It is now read-only.

Commit

Permalink
Fix #27 - Use configuration if passed
Browse files Browse the repository at this point in the history
Use configuration if passed, otherwise find the default configuration
from build setting
Conflicts:

	lib/shenzhen/commands/build.rb
  • Loading branch information
codecaffeine authored and mattt committed Oct 4, 2013
1 parent 685d986 commit f0dabb4
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion lib/shenzhen/commands/build.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,24 @@

log "xcodebuild", (@workspace || @project)

@configuration = options.configuration

flags = []
flags << "-sdk iphoneos"
flags << "-workspace '#{@workspace}'" if @workspace
flags << "-project '#{@project}'" if @project
flags << "-scheme '#{@scheme}'" if @scheme
flags << "-configuration '#{@configuration}'"
flags << "-configuration '#{@configuration}'" if @configuration

@target, @xcodebuild_settings = Shenzhen::XcodeBuild.settings(*flags).detect{|target, settings| settings['WRAPPER_EXTENSION'] == "app"}
say_error "App settings could not be found." and abort unless @xcodebuild_settings

if !@configuration
@configuration = @xcodebuild_settings['CONFIGURATION']
flags << "-configuration '#{@configuration}'"
end

say_warning "Building \"#{@workspace || @project}\" with Scheme \"#{@scheme}\" and Configuration \"#{@configuration}\"\n" unless options.quiet

actions = []
actions << :clean unless options.clean == false
Expand Down

0 comments on commit f0dabb4

Please sign in to comment.