bin/nixenvironment in nixenvironment-0.0.40 vs bin/nixenvironment in nixenvironment-0.0.41
- old
+ new
@@ -30,10 +30,11 @@
global_option ('--deploy_host VALUE') { |value| $deploy_host = value }
global_option ('--deploy_path VALUE') { |value| $deploy_path = value }
global_option ('--deploy_username VALUE') { |value| $deploy_username = value }
global_option ('--deploy_password VALUE') { |value| $deploy_password = value }
+global_option ('--deploy_itunesconnect_username VALUE') { |value| $deploy_itunesconnect_username = value }
global_option ('--icons_path VALUE') { |value| $icons_path = value }
global_option ('--xctest_destination_device VALUE') { |value| $xctest_destination_device = value }
@@ -97,21 +98,22 @@
command :deploy do |c|
c.syntax = 'nixenvironment deploy'
c.description = 'Deploy built artifacts to given server'
c.option '--unity_platform TARGET PLATFORM', String, 'Select target platform for unity deploy (ios or android)'
+ c.option '--deliver_deploy', 'Not only verify but also submit the build on iTunes Connect. (resigned_appstore builds only)'
c.action do |args, options|
need_to_deploy_ios = true
if options.unity_platform and options.unity_platform.length > 0
need_to_deploy_ios, root_working_dir, need_chdir_to_root_working_dir = unity_deploy(options.unity_platform)
end
if need_to_deploy_ios
begin
read_config_settings
- deploy
+ deploy(options.deliver_deploy)
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
Dir.chdir(root_working_dir)
@@ -250,10 +252,11 @@
update_config_settings('EXCLUDE_PATTERN_FOR_CODE_DUPLICATION', $exclude_pattern_for_code_duplication)
update_config_settings('DEPLOY_HOST', $deploy_host)
update_config_settings('DEPLOY_PATH', $deploy_path)
update_config_settings('DEPLOY_USERNAME', $deploy_username)
update_config_settings('DEPLOY_PASSWORD', $deploy_password)
+ update_config_settings('DEPLOY_ITUNESCONNECT_USERNAME', $deploy_itunesconnect_username)
update_config_settings('ICONS_PATH', $icons_path)
update_config_settings('XCTEST_DESTINATION_DEVICE', $xctest_destination_device)
update_config_settings('CONFIGURATION_FILES_PATH', $configuration_files_path)
update_config_settings('CODE_COVERAGE_CONFIGURATION', $code_coverage_configuration)
update_config_settings('CODE_COVERAGE_OUTPUT_DIRECTORY', $code_coverage_output_directory)
@@ -614,18 +617,21 @@
File.rename(@info_plist_backup_name, @unescaped_product_settings_path)
p('Info.plist was restored.')
end
-def deploy
+def deploy(deliver_deploy)
deploy = File.join(BUILD_SCRIPTS_PATH, 'DeployIPA.sh')
deploy_host = @config_settings['DEPLOY_HOST'].nil? || @config_settings['DEPLOY_HOST'].empty? ? ENV['DEPLOY_HOST'] : @config_settings['DEPLOY_HOST']
deploy_path = @config_settings['DEPLOY_PATH'].nil? || @config_settings['DEPLOY_PATH'].empty? ? ENV['DEPLOY_PATH'] : @config_settings['DEPLOY_PATH']
deploy_username = @config_settings['DEPLOY_USERNAME'].nil? || @config_settings['DEPLOY_USERNAME'].empty? ? ENV['DEPLOY_USERNAME'] : @config_settings['DEPLOY_USERNAME']
deploy_password = @config_settings['DEPLOY_PASSWORD'].nil? || @config_settings['DEPLOY_PASSWORD'].empty? ? ENV['DEPLOY_PASSWORD'] : @config_settings['DEPLOY_PASSWORD']
+ deploy_itunesconnect_username = @config_settings['DEPLOY_ITUNESCONNECT_USERNAME'].nil? || @config_settings['DEPLOY_ITUNESCONNECT_USERNAME'].empty? ? ENV['DEPLOY_ITUNESCONNECT_USERNAME'] : @config_settings['DEPLOY_ITUNESCONNECT_USERNAME']
- deploy_success = system("#{deploy} #{deploy_host} #{deploy_path} #{deploy_username} #{deploy_password}")
+ deliver_deploy_value = deliver_deploy ? 1 : 0
+
+ deploy_success = system("#{deploy} #{deploy_host} #{deploy_path} #{deploy_username} #{deploy_password} #{deploy_itunesconnect_username} #{deliver_deploy_value}")
abort('Deploy error!') unless deploy_success
end
def unity_deploy(unity_platform)
root_working_dir = nil