fastlane-plugin-appcircle_testing_distribution 0.4.3.beta.3 → 0.5.0.beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d29253d3bd644428e3c3403ec7de545a6570cf3e2b470c58ba50ddb6c211da9d
4
- data.tar.gz: 3e8298d2f5d547d5891a9f5d34a043c05fdfedf2c5c3c2d66f43def751a372d0
3
+ metadata.gz: ffefedfb52927f54defeb5b68c86e000802a4324073dbcba59a19120b1b97f31
4
+ data.tar.gz: 0cca110881ca0aec01644853f98a2acd3981fd8899166561bb47b9de8c88fb1b
5
5
  SHA512:
6
- metadata.gz: f5d216ec25e3c4162fcad0da1bcd5c2dc28fd9711d973d987c3841b1473f903b83fa2b827bcc894082b1006ce30c811ef6599138816d5455970599418ab8ffa6
7
- data.tar.gz: 0c4280025c48eda9e4b54fdbe44bd7f839cca35bdd2439cd5ab7b0784a0f7d43d6a908df98617891b8f64e489078fb107b63954dc3cf8c80f81059b0cc2204b0
6
+ metadata.gz: a6eff93ab97143092e84361636a54e44cafdedce86911db561540cc291fdce2f4943391e826d852fbe7e534a8ba1ebb33a54696166da588d3220e016722c8e50
7
+ data.tar.gz: ca2c8683a7cba5197a153f389ee46d4bde59cc6bd5a5dc14cc9d81bbae697f92e39729e0bd5f64bfdadf57e445a630bc32b991e5e68f0f302e63e49c5785267b
data/README.md CHANGED
@@ -122,6 +122,8 @@ If you run a self-hosted Appcircle installation, point the plugin to your own en
122
122
  )
123
123
  ```
124
124
 
125
+ > **Self-signed or private CA certificates:** If your self-hosted Appcircle server uses a self-signed certificate (or one issued by a private/internal CA), requests will fail certificate validation. The plugin does not disable TLS verification. Trust the server's CA on the machine running Fastlane — add it to the system certificate store, or point the `SSL_CERT_FILE` environment variable at a PEM bundle that includes it.
126
+
125
127
  ## Further Details
126
128
 
127
129
  For more information please refer to the documentation.
@@ -8,6 +8,29 @@ BASE_URL = "https://api.appcircle.io"
8
8
  module TDUploadService
9
9
  UI = FastlaneCore::UI
10
10
 
11
+ def self.put_with_retry(url, body, headers, max_retries: 5)
12
+ attempt = 0
13
+ delay = 1.0
14
+
15
+ begin
16
+ RestClient.put(url, body, headers)
17
+ rescue => e
18
+ status = e.respond_to?(:http_code) ? e.http_code : nil
19
+ retryable = status == 503 ||
20
+ e.is_a?(RestClient::ServerBrokeConnection) ||
21
+ e.is_a?(Errno::ECONNRESET) ||
22
+ (defined?(RestClient::Exceptions::OpenTimeout) && e.is_a?(RestClient::Exceptions::OpenTimeout)) ||
23
+ (defined?(RestClient::Exceptions::ReadTimeout) && e.is_a?(RestClient::Exceptions::ReadTimeout))
24
+
25
+ raise e if !retryable || attempt >= max_retries
26
+
27
+ attempt += 1
28
+ sleep(delay + rand(0.3))
29
+ delay *= 2
30
+ retry
31
+ end
32
+ end
33
+
11
34
  def self.upload_artifact(token:, message:, app:, dist_profile_id:, api_endpoint: BASE_URL)
12
35
  file_path = app
13
36
  file_name = File.basename(file_path)
@@ -38,14 +61,25 @@ module TDUploadService
38
61
  end
39
62
  file_id = upload_info['fileId']
40
63
  upload_url = upload_info['uploadUrl']
64
+ configuration = upload_info['configuration']
65
+ http_method = (configuration && configuration['httpMethod']) ? configuration['httpMethod'].to_s.upcase : 'PUT'
41
66
 
42
- file_content = File.binread(file_path)
43
67
  UI.message("Uploading file to Appcircle...")
44
- response = RestClient.put(
45
- upload_url,
46
- file_content,
47
- { content_type: 'application/octet-stream' }
48
- )
68
+ if http_method == 'POST'
69
+ sign_parameters = configuration['signParameters'] || {}
70
+ payload = {}
71
+ sign_parameters.each { |key, value| payload[key] = value }
72
+ payload['file'] = File.new(file_path, 'rb')
73
+ response = RestClient.post(upload_url, payload)
74
+ else
75
+ file_content = File.binread(file_path)
76
+ response = put_with_retry(
77
+ upload_url,
78
+ file_content,
79
+ { content_type: 'application/octet-stream' }
80
+ )
81
+ end
82
+
49
83
  if response.code.between?(200, 299)
50
84
  UI.success("File upload finished successfully with status code: #{response.code}")
51
85
  else
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module AppcircleTestingDistribution
3
- VERSION = "0.4.3.beta.3"
3
+ VERSION = "0.5.0.beta.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.4.3.beta.3
4
+ version: 0.5.0.beta.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - appcircleio
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-06-22 00:00:00.000000000 Z
11
+ date: 2026-06-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rest-client