fastlane-plugin-appcircle_testing_distribution 0.2.0 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 56a980fcdde02bf5a93e7fd18711e5048365b997e4781590aca5c95ce5a0c438
4
- data.tar.gz: 0ccaae94dc8a36a4c93951dc63bd6ad776686b0803ccce88e385c49573453af8
3
+ metadata.gz: 7b0f60660f2ea2b25bf7e0088c9e2a1dd70d009b6d0b63bc1d508bb6721d377e
4
+ data.tar.gz: '0586725d636a2e56a87fc604f6a6c1fb284e22d04d771ba5e85d79a6e341b169'
5
5
  SHA512:
6
- metadata.gz: d108ba67106e1d9917f6c4b94791bc61f697f269400a1d4bf16df7cf42a6f6fe572f74bce80d55159774967e7941d015c95d2644e4544bee58c8d2226ffb6a8f
7
- data.tar.gz: 2a452dd82232e4718adf69087fc2ed0be9ee0a0fe753bebe966d358c276880ffd1562f6dc52c8dc63f215c48e30f038d92b7927867183e223f753d9cc89b8c23
6
+ metadata.gz: 7cab5c11069fb4c70abcfdc0ec747670ec043f9efaf9f0635dc7f896fd6a3188ae80ecc68eabc9d401bd4d789ee02c535a32a826569423cfd8d3643462f1dcd6
7
+ data.tar.gz: 173f6f699f45551e550b98a2585ea72c8d14bb8c1023b66cfa890d573584379b3e73521f1bcfcec51a7d1fa4e2541f45c94b3a491a28efc7f696f10d74344dad
@@ -21,17 +21,17 @@ module Fastlane
21
21
 
22
22
  file_extension = File.extname(appPath).downcase
23
23
  unless valid_extensions.include?(file_extension)
24
- raise "Invalid file extension: #{file_extension}. For Android, use .apk or .aab. For iOS, use .ipa or .zip(.xcarchive)."
24
+ UI.user_error!("Invalid file extension: #{file_extension}. For Android, use .apk or .aab. For iOS, use .ipa or .zip(.xcarchive).")
25
25
  end
26
26
 
27
27
  if personalAPIToken.nil?
28
- raise UI.error("Personal API Token is required to authenticate connections to Appcircle services. Please provide a valid access token")
28
+ UI.user_error!("Personal API Token is required to authenticate connections to Appcircle services. Please provide a valid access token")
29
29
  elsif profileName.nil?
30
- raise UI.error("Distribution profile name is required to distribute applications. Please provide a distribution profile name")
30
+ UI.user_error!("Distribution profile name is required to distribute applications. Please provide a distribution profile name")
31
31
  elsif appPath.nil?
32
- raise UI.error("Application file path is required to distribute applications. Please provide a valid application file path")
32
+ UI.user_error!("Application file path is required to distribute applications. Please provide a valid application file path")
33
33
  elsif message.nil?
34
- raise UI.error("Message field is required. Please provide a valid message")
34
+ UI.user_error!("Message field is required. Please provide a valid message")
35
35
  end
36
36
 
37
37
 
@@ -47,7 +47,7 @@ module Fastlane
47
47
  UI.success("Login is successful.")
48
48
  return user.accessToken
49
49
  rescue => e
50
- puts "Login failed: #{e.message}"
50
+ UI.user_error!("Login failed: #{e.message}")
51
51
  end
52
52
  end
53
53
 
@@ -87,11 +87,12 @@ module Fastlane
87
87
  response = TDUploadService.upload_artifact(token: token, message: message, app: appPath, dist_profile_id: profileID)
88
88
  result = self.checkTaskStatus(token, response['taskId'])
89
89
 
90
- if $?.success? and result
90
+ if result
91
91
  UI.success("#{appPath} Uploaded to profile id #{profileID} successfully 🎉")
92
92
  end
93
93
  rescue => e
94
- UI.error("Upload failed with status code #{e.response.code}, with message '#{e.message}'")
94
+ status_code = e.respond_to?(:response) && e.response ? e.response.code : 'unknown'
95
+ UI.user_error!("Upload failed with status code #{status_code}, with message '#{e.message}'")
95
96
  end
96
97
  end
97
98
 
@@ -10,8 +10,7 @@ module TDUploadService
10
10
  url = "https://api.appcircle.io/distribution/v2/profiles/#{dist_profile_id}/app-versions"
11
11
  headers = {
12
12
  Authorization: "Bearer #{token}",
13
- Message: message,
14
- content_type: :multipart
13
+ content_type: :multipart # multipart/form-data
15
14
  }
16
15
  payload = {
17
16
  Message: message,
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module AppcircleTestingDistribution
3
- VERSION = "0.2.0"
3
+ VERSION = "0.2.2"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane-plugin-appcircle_testing_distribution
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - appcircleio
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-09-04 00:00:00.000000000 Z
11
+ date: 2024-10-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rest-client
@@ -61,7 +61,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
61
61
  - !ruby/object:Gem::Version
62
62
  version: '0'
63
63
  requirements: []
64
- rubygems_version: 3.4.10
64
+ rubygems_version: 3.4.19
65
65
  signing_key:
66
66
  specification_version: 4
67
67
  summary: Efficiently distribute application builds to users or testing groups using