From 431b0cdd0ce194ff4f78c47074101fb1fc6caf43 Mon Sep 17 00:00:00 2001 From: Mark Villacampa Date: Tue, 21 Oct 2014 15:48:27 +0200 Subject: [PATCH 1/2] Show progress during upload --- lib/motion/project/testflight.rb | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/lib/motion/project/testflight.rb b/lib/motion/project/testflight.rb index 1bd894c..4b70f64 100644 --- a/lib/motion/project/testflight.rb +++ b/lib/motion/project/testflight.rb @@ -1,15 +1,15 @@ # Copyright (c) 2012, Laurent Sansonetti # All rights reserved. -# +# # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: -# +# # 1. Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright notice, # this list of conditions and the following disclaimer in the documentation # and/or other materials provided with the distribution. -# +# # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE @@ -39,7 +39,7 @@ def sdk=(sdk) @sdk = sdk @config.vendor_project(sdk, :static) libz = '/usr/lib/libz.dylib' - @config.libs << libz unless @config.libs.index(libz) + @config.libs << libz unless @config.libs.index(libz) end end @@ -118,7 +118,7 @@ def testflight? App.fail "Submission notes must be provided via the `notes' environment variable. Example: rake testflight notes='w00t'" unless notes Rake::Task["archive"].invoke - + # An archived version of the .dSYM bundle is needed. app_dsym = App.config.app_bundle_dsym('iPhoneOS') app_dsym_zip = app_dsym + '.zip' @@ -126,10 +126,11 @@ def testflight? Dir.chdir(File.dirname(app_dsym)) do sh "/usr/bin/zip -q -r \"#{File.basename(app_dsym)}.zip\" \"#{File.basename(app_dsym)}\"" end - end - - curl = "/usr/bin/curl http://testflightapp.com/api/builds.json -F file=@\"#{App.config.archive}\" -F dsym=@\"#{app_dsym_zip}\" -F api_token='#{prefs.api_token}' -F team_token='#{prefs.team_token}' -F notes=\"#{notes}\" -F notify=#{prefs.notify ? "True" : "False"}" + end + + curl = "/usr/bin/curl http://testflightapp.com/api/builds.json --progress-bar -F file=@\"#{App.config.archive}\" -F dsym=@\"#{app_dsym_zip}\" -F api_token='#{prefs.api_token}' -F team_token='#{prefs.team_token}' -F notes=\"#{notes}\" -F notify=#{prefs.notify ? "True" : "False"}" curl << " -F distribution_lists='#{distribution_lists}'" if distribution_lists + curl << " | tee" App.info 'Run', curl sh curl end From 9829cdc18f594f1ac1556d7cb14bd22ffc8dbfec Mon Sep 17 00:00:00 2001 From: Mark Villacampa Date: Wed, 26 Nov 2014 18:43:31 +0100 Subject: [PATCH 2/2] disable crash reporting --- lib/motion/project/testflight.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/motion/project/testflight.rb b/lib/motion/project/testflight.rb index 4b70f64..919ff5c 100644 --- a/lib/motion/project/testflight.rb +++ b/lib/motion/project/testflight.rb @@ -72,6 +72,7 @@ def create_launcher if Object.const_defined?('TestFlight') and !UIDevice.currentDevice.model.include?('Simulator') NSNotificationCenter.defaultCenter.addObserverForName(UIApplicationDidFinishLaunchingNotification, object:nil, queue:nil, usingBlock:lambda do |notification| #{'TestFlight.setDeviceIdentifier(UIDevice.currentDevice.uniqueIdentifier)' if identify_testers} + TestFlight.setOptions({ TFOptionReportCrashes => false}) TestFlight.takeOff('#{app_token || team_token}') end) end