fastlane-plugin-emerge 0.10.6 → 0.11.0

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: 6b3fdf2609746465c109005ada64d6fb3934e0930bd900e448b60551fcffbc4b
4
- data.tar.gz: 55c71ed30681633f8a7e2736302f8b3c209c5f0a11387dcb96a967376507b2bd
3
+ metadata.gz: 525c939cf12a49278a0a04616c234773dd83a3cb498871f577ceeeebb7033ec5
4
+ data.tar.gz: 5f9b601da72ba7753991b5b86b29155619e93373947463b4b7e946e937bf9c20
5
5
  SHA512:
6
- metadata.gz: f101d6387c86c67b746a89ebc2cdeeb71777d7a8942031bc49f968423668131fa8a9f4a4b5cedcdd00fb55c9d1e7323a810f6f0fae739e00cd4ac3af05f5e972
7
- data.tar.gz: d8a28c08d15a438b24e9c15a153897cec5749fc2bfab57e8966fe232ba804bb560f19c13743402e335f9e07b4f83a4b75aec06ebff7fda1825144dc55fd16e84
6
+ metadata.gz: 60d9504b516a418430956f189c7a81b704b7efa02ab81c55f5010067c5dc2999039e347a61a69cef95ee6dbfefdbf4e685d439b567ece644a21a486648a2ff32
7
+ data.tar.gz: 5ceacb92ab5c883334028744c0702176dcba37ebc96f49177b8c44a8a17480bd8668a27bb5c09d11b6a56e6d24f2608fbb2935d33de28c3e92a6c1b32c09cbc2
data/README.md CHANGED
@@ -16,7 +16,9 @@ fastlane add_plugin emerge
16
16
 
17
17
  ## Usage
18
18
 
19
- To get started, first obtain an [API token](https://docs.emergetools.com/docs/uploading-basics#obtain-an-api-key) for your organization. The API Token is used to authenticate with the Emerge API in each call. Our actions will automatically pick up the API key if configured as an `EMERGE_API_TOKEN` environment variable.
19
+ ### API Token
20
+
21
+ First obtain an [API token](https://docs.emergetools.com/docs/uploading-basics#obtain-an-api-key) for your organization. The API Token is used to authenticate with the Emerge API in each call. Our actions will automatically pick up the API key if configured as an `EMERGE_API_TOKEN` environment variable.
20
22
 
21
23
  ### Size Analysis
22
24
 
@@ -37,12 +39,22 @@ For a full list of available parameters run `fastlane action emerge`.
37
39
 
38
40
  ### Snapshot Testing
39
41
 
42
+ Emerge Snapshot Testing works by parsing Xcode Previews _from the app binary_. This means the upload to Emerge's service needs to include Previews as part of the app code. There are a couple ways to do this:
43
+
44
+ #### Re-use a unit test build with the `emerge()` action
45
+
46
+ If you're already running unit tests with fastlane, simply call the `emerge()` action after running unit tests to automatically upload the unit test build to Emerge. The action will detect the build generated for unit tests, or the `file_path` param can be explicitly set. Generally this build is a Debug build and should have Previews code included.
47
+
48
+ #### Generate a new build with the `emerge_snapshot()` action
49
+
50
+ This will build the app from scratch with recommended configurations to prevent Previews from being removed/stripped, and then upload the built app to Emerge.
51
+
40
52
  ```ruby
41
53
  platform :ios do
42
54
  lane :snapshot_testing do
43
- # Call our `emerge_snapshot()` action with the respective scheme for
55
+ # Call the `emerge_snapshot()` action with the respective scheme for
44
56
  # us to build. We will generate a build with the recommended settings
45
- # and upload to our API.
57
+ # and upload to Emerge's API.
46
58
  emerge_snapshot(scheme: 'Hacker News')
47
59
  end
48
60
  end
@@ -37,8 +37,10 @@ module Fastlane
37
37
  order_file_version = params[:order_file_version]
38
38
  config_path = params[:config_path]
39
39
 
40
- if file_path.nil? || !File.exist?(file_path)
41
- UI.error("Invalid input file")
40
+ if file_path.nil?
41
+ UI.error("No input file was provided, make sure it is set in the action")
42
+ elsif !File.exist?(file_path)
43
+ UI.error("No file exists at #{file_path}")
42
44
  return false
43
45
  else
44
46
  UI.message("Using file_path: #{file_path}")
@@ -97,7 +99,7 @@ module Fastlane
97
99
  elsif (extension == '.zip' || extension == '.ipa') && params[:linkmaps] && params[:linkmaps].length > 0
98
100
  UI.error("Provided #{extension == '.zip' ? 'zipped archive' : 'ipa'} and linkmaps, linkmaps will not be added to upload.")
99
101
  elsif extension != '.zip' && extension != '.ipa'
100
- UI.error("Invalid input file")
102
+ UI.error("Invalid input file extension: #{extension}")
101
103
  return false
102
104
  end
103
105
 
@@ -112,7 +114,8 @@ module Fastlane
112
114
  orderFileVersion: order_file_version,
113
115
  appIdSuffix: params[:app_id_suffix],
114
116
  releaseNotes: params[:release_notes],
115
- tag: tag || "default"
117
+ tag: tag || "default",
118
+ buildDir: params[:build_dir]
116
119
  }
117
120
  upload_id = Helper::EmergeHelper.perform_upload(api_token, params, file_path)
118
121
  UI.success("🎉 Your app is processing, you can find the results at https://emergetools.com/build/#{upload_id}")
@@ -215,6 +218,10 @@ module Fastlane
215
218
  FastlaneCore::ConfigItem.new(key: :release_notes,
216
219
  description: "A markdown string with release notes for the upload",
217
220
  optional: true,
221
+ type: String),
222
+ FastlaneCore::ConfigItem.new(key: :build_dir,
223
+ description: "The directory used to build the app",
224
+ optional: true,
218
225
  type: String)
219
226
  ]
220
227
  end
@@ -124,10 +124,12 @@ module Fastlane
124
124
  end
125
125
 
126
126
  def self.upload_file(api_token, upload_url, file_path)
127
- response = Faraday.put(upload_url) do |req|
128
- req.headers = headers(api_token, nil, 'application/zip')
129
- req.headers['Content-Length'] = File.size(file_path).to_s
130
- req.body = Faraday::UploadIO.new(file_path, 'application/zip')
127
+ response = File.open(file_path, 'rb') do |file|
128
+ Faraday.put(upload_url) do |req|
129
+ req.headers = headers(api_token, nil, 'application/zip')
130
+ req.headers['Content-Length'] = File.size(file_path).to_s
131
+ req.body = file
132
+ end
131
133
  end
132
134
 
133
135
  raise "Uploading zip file failed #{response.status}" unless response.status == 200
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module Emerge
3
- VERSION = "0.10.6"
3
+ VERSION = "0.11.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane-plugin-emerge
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.6
4
+ version: 0.11.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Emerge Tools, Inc
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-10-17 00:00:00.000000000 Z
11
+ date: 2026-08-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -16,14 +16,20 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '1.1'
19
+ version: '2.14'
20
+ - - ">="
21
+ - !ruby/object:Gem::Version
22
+ version: 2.14.1
20
23
  type: :runtime
21
24
  prerelease: false
22
25
  version_requirements: !ruby/object:Gem::Requirement
23
26
  requirements:
24
27
  - - "~>"
25
28
  - !ruby/object:Gem::Version
26
- version: '1.1'
29
+ version: '2.14'
30
+ - - ">="
31
+ - !ruby/object:Gem::Version
32
+ version: 2.14.1
27
33
  - !ruby/object:Gem::Dependency
28
34
  name: pry
29
35
  requirement: !ruby/object:Gem::Requirement
@@ -98,16 +104,16 @@ dependencies:
98
104
  name: rubocop
99
105
  requirement: !ruby/object:Gem::Requirement
100
106
  requirements:
101
- - - '='
107
+ - - "~>"
102
108
  - !ruby/object:Gem::Version
103
- version: 0.49.1
109
+ version: 1.90.0
104
110
  type: :development
105
111
  prerelease: false
106
112
  version_requirements: !ruby/object:Gem::Requirement
107
113
  requirements:
108
- - - '='
114
+ - - "~>"
109
115
  - !ruby/object:Gem::Version
110
- version: 0.49.1
116
+ version: 1.90.0
111
117
  - !ruby/object:Gem::Dependency
112
118
  name: rubocop-require_tools
113
119
  requirement: !ruby/object:Gem::Requirement
@@ -126,16 +132,16 @@ dependencies:
126
132
  name: simplecov
127
133
  requirement: !ruby/object:Gem::Requirement
128
134
  requirements:
129
- - - ">="
135
+ - - "~>"
130
136
  - !ruby/object:Gem::Version
131
- version: '0'
137
+ version: 0.22.0
132
138
  type: :development
133
139
  prerelease: false
134
140
  version_requirements: !ruby/object:Gem::Requirement
135
141
  requirements:
136
- - - ">="
142
+ - - "~>"
137
143
  - !ruby/object:Gem::Version
138
- version: '0'
144
+ version: 0.22.0
139
145
  - !ruby/object:Gem::Dependency
140
146
  name: fastlane
141
147
  requirement: !ruby/object:Gem::Requirement
@@ -179,14 +185,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
179
185
  requirements:
180
186
  - - ">="
181
187
  - !ruby/object:Gem::Version
182
- version: '0'
188
+ version: '3.0'
183
189
  required_rubygems_version: !ruby/object:Gem::Requirement
184
190
  requirements:
185
191
  - - ">="
186
192
  - !ruby/object:Gem::Version
187
193
  version: '0'
188
194
  requirements: []
189
- rubygems_version: 3.2.3
195
+ rubygems_version: 3.5.21
190
196
  signing_key:
191
197
  specification_version: 4
192
198
  summary: Fastlane plugin for Emerge