bin/nixenvironment in nixenvironment-0.0.13 vs bin/nixenvironment in nixenvironment-0.0.14
- old
+ new
@@ -268,15 +268,23 @@
end
abort("Build error! Configuration #{config} doesn't exist") unless info['Build Configurations'].include?(config)
if @config['PROJECT_TO_BUILD'] and @config['PROJECT_TO_BUILD'].length > 0
- cmd_output = %x[ xcodebuild -project #{@config['PROJECT_TO_BUILD']}\
- -target #{@config['PROJECT_TARGET_TO_BUILD']}\
- -configuration #{config}\
- -sdk #{@config['SDK']}\
- -showBuildSettings ]
+ if @config['PROJECT_TARGET_TO_BUILD'] and @config['PROJECT_TARGET_TO_BUILD'].length > 0
+ cmd_output = %x[ xcodebuild -project #{@config['PROJECT_TO_BUILD']}\
+ -target #{@config['PROJECT_TARGET_TO_BUILD']}\
+ -configuration #{config}\
+ -sdk #{@config['SDK']}\
+ -showBuildSettings ]
+ else
+ cmd_output = %x[ xcodebuild -project #{@config['PROJECT_TO_BUILD']}\
+ -scheme #{@config['WORKSPACE_SCHEME_TO_BUILD']}\
+ -configuration #{config}\
+ -sdk #{@config['SDK']}\
+ -showBuildSettings ]
+ end
elsif @config['WORKSPACE_TO_BUILD'] and @config['WORKSPACE_TO_BUILD'].length > 0
cmd_output = %x[ xcodebuild -workspace #{@config['WORKSPACE_TO_BUILD']}\
-scheme #{@config['WORKSPACE_SCHEME_TO_BUILD']}\
-configuration #{config}\
-sdk #{@config['SDK']}\
@@ -349,14 +357,22 @@
build = File.join(BUILD_SCRIPTS_PATH, 'Build.py')
build_success = nil
if @config['PROJECT_TO_BUILD'] and @config['PROJECT_TO_BUILD'].length > 0
- build_success = system("#{build} --project \"#{@config['PROJECT_TO_BUILD']}\"\
- --target \"#{@config['PROJECT_TARGET_TO_BUILD']}\"\
- --configuration \"#{config}\"\
- --sdk \"#{@config['SDK']}\"\
- --env-var-prefix \"#{@config['ENV_VAR_PREFIX']}\"")
+ if @config['PROJECT_TARGET_TO_BUILD'] and @config['PROJECT_TARGET_TO_BUILD'].length > 0
+ build_success = system("#{build} --project \"#{@config['PROJECT_TO_BUILD']}\"\
+ --target \"#{@config['PROJECT_TARGET_TO_BUILD']}\"\
+ --configuration \"#{config}\"\
+ --sdk \"#{@config['SDK']}\"\
+ --env-var-prefix \"#{@config['ENV_VAR_PREFIX']}\"")
+ else
+ build_success = system("#{build} --project \"#{@config['PROJECT_TO_BUILD']}\"\
+ --scheme \"#{@config['WORKSPACE_SCHEME_TO_BUILD']}\"\
+ --configuration \"#{config}\"\
+ --sdk \"#{@config['SDK']}\"\
+ --env-var-prefix \"#{@config['ENV_VAR_PREFIX']}\"")
+ end
elsif @config['WORKSPACE_TO_BUILD'] and @config['WORKSPACE_TO_BUILD'].length > 0
build_success = system("#{build} --workspace \"#{@config['WORKSPACE_TO_BUILD']}\"\
--scheme \"#{@config['WORKSPACE_SCHEME_TO_BUILD']}\"\
--configuration \"#{config}\"\
--sdk \"#{@config['SDK']}\"\