bin/nixenvironment in nixenvironment-0.0.34 vs bin/nixenvironment in nixenvironment-0.0.35

- old
+ new

@@ -62,10 +62,11 @@ c.description = 'Build project for selected configuration and make signed/resigned ipa' c.option '--config NAME', String, 'Select configuration' c.option '--ipa TYPE', String, 'Select sign (ipa, resigned_ipa_for_device, resigned_ipa_for_adhoc_distribution or resigned_ipa_for_appstore)' c.option '--ci_build', 'Define NIXENV_CI_BUILD environment variable' c.option '--unity TARGET PLATFORM', String, 'Select target platform for unity build (ios or android)' + c.option '--ndsym', 'Disable .dsym generation for ios project' c.action do |args, options| options.default :config => 'Debug', :ipa => 'ipa' need_to_build_ios = true @@ -77,11 +78,11 @@ begin read_config_settings enable_ci_build(options.ci_build) supplement_config_settings(options.config) prebuild(options.config) - build(options.config, options.ipa) + build(options.config, options.ipa, options.ndsym) restore_info_plist rescue raise # re-rise exception but chdir to root_working_dir in ensure block first if needed ensure if need_chdir_to_root_working_dir and root_working_dir @@ -413,47 +414,49 @@ # TODO: rewrite tagIcons.sh # system("#{tag_icons} #{@config_settings['ICONS_PATH']}") end -def build(config, ipa) +def build(config, ipa, ndsym) build = File.join(BUILD_SCRIPTS_PATH, 'Build.py') build_success = nil configuration_build_dir = @config_settings['CONFIGURATION_BUILD_DIR'] dwarf_dsym_folder_path = @config_settings['DWARF_DSYM_FOLDER_PATH'] built_products_dir = @config_settings['BUILT_PRODUCTS_DIR'] + debug_information_format = ndsym ? 'dwarf' : 'dwarf-with-dsym' + if @config_settings['PROJECT_TO_BUILD'] and @config_settings['PROJECT_TO_BUILD'].length > 0 if @config_settings['PROJECT_TARGET_TO_BUILD'] and @config_settings['PROJECT_TARGET_TO_BUILD'].length > 0 build_success = system("#{build} --project \"#{@config_settings['PROJECT_TO_BUILD']}\"\ --target \"#{@config_settings['PROJECT_TARGET_TO_BUILD']}\"\ --configuration \"#{config}\"\ --sdk \"#{@config_settings['SDK']}\"\ --env-var-prefix \"#{@config_settings['ENV_VAR_PREFIX']}\"\ - DEBUG_INFORMATION_FORMAT=\"dwarf-with-dsym\"\ + DEBUG_INFORMATION_FORMAT=\"#{debug_information_format}\"\ DWARF_DSYM_FOLDER_PATH=\"#{dwarf_dsym_folder_path}\"\ CONFIGURATION_BUILD_DIR=\"#{configuration_build_dir}\"\ BUILT_PRODUCTS_DIR=\"#{built_products_dir}\"") else build_success = system("#{build} --project \"#{@config_settings['PROJECT_TO_BUILD']}\"\ --scheme \"#{@config_settings['WORKSPACE_SCHEME_TO_BUILD']}\"\ --configuration \"#{config}\"\ --sdk \"#{@config_settings['SDK']}\"\ --env-var-prefix \"#{@config_settings['ENV_VAR_PREFIX']}\"\ - DEBUG_INFORMATION_FORMAT=\"dwarf-with-dsym\"\ + DEBUG_INFORMATION_FORMAT=\"#{debug_information_format}\"\ DWARF_DSYM_FOLDER_PATH=\"#{dwarf_dsym_folder_path}\"\ CONFIGURATION_BUILD_DIR=\"#{configuration_build_dir}\"\ BUILT_PRODUCTS_DIR=\"#{built_products_dir}\"") end elsif @config_settings['WORKSPACE_TO_BUILD'] and @config_settings['WORKSPACE_TO_BUILD'].length > 0 build_success = system("#{build} --workspace \"#{@config_settings['WORKSPACE_TO_BUILD']}\"\ --scheme \"#{@config_settings['WORKSPACE_SCHEME_TO_BUILD']}\"\ --configuration \"#{config}\"\ --sdk \"#{@config_settings['SDK']}\"\ --env-var-prefix \"#{@config_settings['ENV_VAR_PREFIX']}\"\ - DEBUG_INFORMATION_FORMAT=\"dwarf-with-dsym\"\ + DEBUG_INFORMATION_FORMAT=\"#{debug_information_format}\"\ DWARF_DSYM_FOLDER_PATH=\"#{dwarf_dsym_folder_path}\"\ CONFIGURATION_BUILD_DIR=\"#{configuration_build_dir}\"\ BUILT_PRODUCTS_DIR=\"#{built_products_dir}\"") end