diff --git a/lib/fastlane/plugin/appcircle_testing_distribution/actions/appcircle_testing_distribution_action.rb b/lib/fastlane/plugin/appcircle_testing_distribution/actions/appcircle_testing_distribution_action.rb index b5a6f35..c728d2f 100644 --- a/lib/fastlane/plugin/appcircle_testing_distribution/actions/appcircle_testing_distribution_action.rb +++ b/lib/fastlane/plugin/appcircle_testing_distribution/actions/appcircle_testing_distribution_action.rb @@ -87,11 +87,12 @@ def self.ac_upload(token, appPath, profileID, message) response = TDUploadService.upload_artifact(token: token, message: message, app: appPath, dist_profile_id: profileID) result = self.checkTaskStatus(token, response['taskId']) - if $?.success? and result + if result UI.success("#{appPath} Uploaded to profile id #{profileID} successfully 🎉") end rescue => e - UI.error("Upload failed with status code #{e.response.code}, with message '#{e.message}'") + status_code = e.respond_to?(:response) && e.response ? e.response.code : 'unknown' + UI.error("Upload failed with status code #{status_code}, with message '#{e.message}'") end end diff --git a/lib/fastlane/plugin/appcircle_testing_distribution/version.rb b/lib/fastlane/plugin/appcircle_testing_distribution/version.rb index 4271558..db4dbbd 100644 --- a/lib/fastlane/plugin/appcircle_testing_distribution/version.rb +++ b/lib/fastlane/plugin/appcircle_testing_distribution/version.rb @@ -1,5 +1,5 @@ module Fastlane module AppcircleTestingDistribution - VERSION = "0.2.0" + VERSION = "0.2.1" end end