fastlane-plugin-sentry 2.1.0 → 2.2.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: 207e11b8aa823f79ec731ad133d8541cc9b189cef78b8918588a0822952860e6
4
- data.tar.gz: 5ce55cf1fe9ddc2f9ff242ef059160813f50fd6092f520273a3b820cc30ed537
3
+ metadata.gz: 8e94534abf55ab666c3114f03a3a1673accc6b8990603475eefdb9d74e865f8c
4
+ data.tar.gz: 3a4ab1661bd1bd22b49146edda0babb877571226c2e03cec8a627b7f2b6884d3
5
5
  SHA512:
6
- metadata.gz: 768cab95c776d74ab4a13b6c149e726baee2ed73dd000669714c8c4a6d30341f3695714bbcdb9c792a7a46d8812a8e1b0ca6f16e0e4bfe6daba8b620d5255db6
7
- data.tar.gz: 8c449a5fe7f95b34d1a7267648392b2f520b3b9b893a6fe187e0eb305990441cc09e8a17d8e32fbe7a531970956e25e605565a1b6e5ee3c24badb39e76c87438
6
+ metadata.gz: '09a2fcb0176e61b7a544babf58dfc60d8622b684d1ef45c3670da424910bbad7d39d2e340a495fab409ba37926ff9ccea9a61f6855f490ac30e65fa1f48cc005'
7
+ data.tar.gz: ca96667484f0a4501c79224966e6e48d12354006b8686119de42df26324c096b75fa6175626a3a02bb26383baeee03c4c43327e6a1bc68d71924c0b9748a2023
data/README.md CHANGED
@@ -85,16 +85,23 @@ Further options:
85
85
  - **wait_for**: Optional. Wait for the server to fully process uploaded files, but at most for the given number of seconds. Errors can only be displayed if --wait or --wait-for is specified, but this will significantly slow down the upload process.
86
86
  - **il2cpp_mapping**: Optional. Compute il2cpp line mappings and upload them along with sources.
87
87
 
88
- ### Uploading iOS Build Archives
88
+ ### Uploading Builds
89
89
 
90
- Upload iOS build archives (.xcarchive) to Sentry for improved symbolication and source context.
90
+ Upload build files to Sentry for improved symbolication and source context. Supported formats:
91
+
92
+ - **iOS**: `.xcarchive` (build archive) or `.ipa` (app bundle)
93
+ - **Android**: `.apk` or `.aab` (App Bundle)
94
+
95
+ Explicitly passed path parameters take precedence over SharedValues. For IPA uploads, use `dsym_path` to attach dSYM files for symbolication (IPAs typically don't embed symbols).
91
96
 
92
97
  ```ruby
93
98
  sentry_upload_build(
94
99
  auth_token: '...',
95
100
  org_slug: '...',
96
101
  project_slug: '...',
97
- xcarchive_path: './build/MyApp.xcarchive', # Path to your .xcarchive file
102
+ # One of: xcarchive_path, ipa_path, apk_path, or aab_path (mutually exclusive)
103
+ xcarchive_path: './build/MyApp.xcarchive', # or ipa_path, apk_path, aab_path
104
+ dsym_path: './build/MyApp.app.dSYM.zip', # Optional. For IPA/xcarchive - path or array of dSYM paths. Defaults to DSYM_OUTPUT_PATH from lane context when not specified
98
105
  # Optional git context parameters (can also be set via environment variables)
99
106
  head_sha: 'abc123...', # The SHA of the head of the current branch (or SENTRY_HEAD_SHA)
100
107
  base_sha: 'def456...', # The SHA of the base branch (or SENTRY_BASE_SHA)
@@ -112,9 +119,9 @@ sentry_upload_build(
112
119
  )
113
120
  ```
114
121
 
115
- By default the `SharedValue::XCODEBUILD_ARCHIVE` sets the `xcarchive_path` parameter if set by a prior lane such as `build_app`.
122
+ Path parameters default to SharedValues when not explicitly passed: `XCODEBUILD_ARCHIVE` (xcarchive), `IPA_OUTPUT_PATH` (ipa), `GRADLE_APK_OUTPUT_PATH` (apk), `GRADLE_AAB_OUTPUT_PATH` (aab). Explicit parameters always take precedence.
116
123
 
117
- This action is only supported on iOS platform.
124
+ This action is supported on iOS and Android platforms.
118
125
 
119
126
  ### Creating & Finalizing Releases
120
127
 
@@ -239,6 +246,7 @@ When upgrading to the latest version of this plugin (which uses sentry-cli v3),
239
246
  #### Parameter Name Changes
240
247
 
241
248
  - **`sentry_debug_files_upload`**: The `ids` parameter has been renamed to `id` (singular). Update your Fastfiles:
249
+
242
250
  ```ruby
243
251
  # Before
244
252
  sentry_debug_files_upload(ids: 'abc123')
@@ -250,6 +258,7 @@ When upgrading to the latest version of this plugin (which uses sentry-cli v3),
250
258
  #### Authentication Changes
251
259
 
252
260
  - **All actions**: The `api_key` parameter has been removed in favor of `auth_token` with the release of [v2.0.0](https://github.com/getsentry/sentry-fastlane-plugin/releases/2.0.0-rc.1). All actions now require `auth_token` for authentication. Update your Fastfiles:
261
+
253
262
  ```ruby
254
263
  # Before v2.0.0-rc.1
255
264
  sentry_debug_files_upload(api_key: '...')
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -4,25 +4,8 @@ module Fastlane
4
4
  def self.run(params)
5
5
  Helper::SentryConfig.parse_api_params(params)
6
6
 
7
- # Determine which build file path to use (conflicting_options handles mutual exclusivity)
8
- build_path = nil
9
- build_type = nil
10
-
11
- if params[:xcarchive_path]
12
- build_path = params[:xcarchive_path]
13
- build_type = :xcarchive
14
- elsif params[:apk_path]
15
- build_path = params[:apk_path]
16
- build_type = :apk
17
- elsif params[:aab_path]
18
- build_path = params[:aab_path]
19
- build_type = :aab
20
- elsif params[:ipa_path]
21
- build_path = params[:ipa_path]
22
- build_type = :ipa
23
- else
24
- UI.user_error!("One of xcarchive_path, apk_path, aab_path, or ipa_path must be provided")
25
- end
7
+ # Resolve build path: explicit params take precedence over SharedValues defaults
8
+ build_path, build_type = resolve_build_path(params)
26
9
 
27
10
  UI.user_error!("Could not find build file at path '#{build_path}'") unless File.exist?(build_path)
28
11
 
@@ -74,6 +57,9 @@ module Fastlane
74
57
 
75
58
  Helper::SentryHelper.call_sentry_cli(params, command)
76
59
  UI.success("Successfully uploaded build file: #{build_path}")
60
+
61
+ # Upload dSYMs for iOS builds when dsym_path is provided or DSYM_OUTPUT_PATH is set
62
+ upload_dsym_if_requested(params, build_type)
77
63
  end
78
64
 
79
65
  #####################################################
@@ -86,16 +72,17 @@ module Fastlane
86
72
 
87
73
  def self.details
88
74
  "This action allows you to upload build files to Sentry. Supported formats include iOS build archives (.xcarchive), " \
89
- "iOS app bundles (.ipa), Android APK files (.apk), and Android App Bundles (.aab). The action supports optional " \
90
- "git-related parameters for enhanced context including commit SHAs, branch names, repository information, and pull " \
91
- "request details. Install groups can be specified to control update visibility between builds."
75
+ "iOS app bundles (.ipa), Android APK files (.apk), and Android App Bundles (.aab). IPA files typically don't " \
76
+ "embed dSYMs—use the dsym_path parameter to upload symbols for proper symbolication, or call sentry_debug_files_upload " \
77
+ "separately. The action supports optional git-related parameters for enhanced context including commit SHAs, " \
78
+ "branch names, repository information, and pull request details. Install groups can be specified to control update " \
79
+ "visibility between builds."
92
80
  end
93
81
 
94
82
  def self.available_options
95
83
  Helper::SentryConfig.common_api_config_items + [
96
84
  FastlaneCore::ConfigItem.new(key: :xcarchive_path,
97
- description: "Path to your iOS build archive (.xcarchive). Mutually exclusive with apk_path, aab_path, and ipa_path",
98
- default_value: Actions.lane_context[SharedValues::XCODEBUILD_ARCHIVE],
85
+ description: "Path to your iOS build archive (.xcarchive). Defaults to XCODEBUILD_ARCHIVE from lane context. Mutually exclusive with apk_path, aab_path, and ipa_path",
99
86
  optional: true,
100
87
  conflicting_options: [:apk_path, :aab_path, :ipa_path],
101
88
  verify_block: proc do |value|
@@ -105,8 +92,7 @@ module Fastlane
105
92
  UI.user_error!("Path '#{value}' is not an xcarchive") unless File.extname(value) == '.xcarchive'
106
93
  end),
107
94
  FastlaneCore::ConfigItem.new(key: :apk_path,
108
- description: "Path to your Android APK file (.apk). Mutually exclusive with xcarchive_path, aab_path, and ipa_path",
109
- default_value: Actions.lane_context[SharedValues::GRADLE_APK_OUTPUT_PATH],
95
+ description: "Path to your Android APK file (.apk). Defaults to GRADLE_APK_OUTPUT_PATH from lane context. Mutually exclusive with xcarchive_path, aab_path, and ipa_path",
110
96
  optional: true,
111
97
  conflicting_options: [:xcarchive_path, :aab_path, :ipa_path],
112
98
  verify_block: proc do |value|
@@ -116,8 +102,7 @@ module Fastlane
116
102
  UI.user_error!("Path '#{value}' is not an APK") unless File.extname(value).casecmp('.apk').zero?
117
103
  end),
118
104
  FastlaneCore::ConfigItem.new(key: :aab_path,
119
- description: "Path to your Android App Bundle (.aab). Mutually exclusive with xcarchive_path, apk_path, and ipa_path",
120
- default_value: Actions.lane_context[SharedValues::GRADLE_AAB_OUTPUT_PATH],
105
+ description: "Path to your Android App Bundle (.aab). Defaults to GRADLE_AAB_OUTPUT_PATH from lane context. Mutually exclusive with xcarchive_path, apk_path, and ipa_path",
121
106
  optional: true,
122
107
  conflicting_options: [:xcarchive_path, :apk_path, :ipa_path],
123
108
  verify_block: proc do |value|
@@ -127,8 +112,7 @@ module Fastlane
127
112
  UI.user_error!("Path '#{value}' is not an AAB") unless File.extname(value).casecmp('.aab').zero?
128
113
  end),
129
114
  FastlaneCore::ConfigItem.new(key: :ipa_path,
130
- description: "Path to your iOS app bundle (.ipa). Mutually exclusive with xcarchive_path, apk_path, and aab_path",
131
- default_value: Actions.lane_context[SharedValues::IPA_OUTPUT_PATH],
115
+ description: "Path to your iOS app bundle (.ipa). Defaults to IPA_OUTPUT_PATH from lane context. For symbolication, use dsym_path or call sentry_debug_files_upload separately. Mutually exclusive with xcarchive_path, apk_path, and aab_path",
132
116
  optional: true,
133
117
  conflicting_options: [:xcarchive_path, :apk_path, :aab_path],
134
118
  verify_block: proc do |value|
@@ -137,6 +121,11 @@ module Fastlane
137
121
  UI.user_error!("Could not find IPA at path '#{value}'") unless File.exist?(value)
138
122
  UI.user_error!("Path '#{value}' is not an IPA") unless File.extname(value).casecmp('.ipa').zero?
139
123
  end),
124
+ FastlaneCore::ConfigItem.new(key: :dsym_path,
125
+ description: "Path to dSYM file(s) for symbolication. Use when uploading IPA (IPAs typically don't embed dSYMs). Can be a path or array of paths. Defaults to DSYM_OUTPUT_PATH from lane context for iOS builds when not specified",
126
+ optional: true,
127
+ type: Array,
128
+ skip_type_validation: true),
140
129
  FastlaneCore::ConfigItem.new(key: :head_sha,
141
130
  env_name: "SENTRY_HEAD_SHA",
142
131
  description: "The SHA of the head of the current branch",
@@ -217,6 +206,62 @@ module Fastlane
217
206
  def self.is_supported?(platform)
218
207
  [:ios, :android].include?(platform)
219
208
  end
209
+
210
+ #####################################################
211
+ # @!group Private helpers
212
+ #####################################################
213
+
214
+ def self.resolve_build_path(params)
215
+ # Explicit params take precedence over SharedValues defaults
216
+ if params[:ipa_path] && !params[:ipa_path].to_s.empty?
217
+ [params[:ipa_path], :ipa]
218
+ elsif params[:xcarchive_path] && !params[:xcarchive_path].to_s.empty?
219
+ [params[:xcarchive_path], :xcarchive]
220
+ elsif params[:apk_path] && !params[:apk_path].to_s.empty?
221
+ [params[:apk_path], :apk]
222
+ elsif params[:aab_path] && !params[:aab_path].to_s.empty?
223
+ [params[:aab_path], :aab]
224
+ else
225
+ # No explicit path - use SharedValues defaults
226
+ path = Actions.lane_context[SharedValues::XCODEBUILD_ARCHIVE]
227
+ return [path, :xcarchive] if path && !path.to_s.empty?
228
+
229
+ path = Actions.lane_context[SharedValues::GRADLE_APK_OUTPUT_PATH]
230
+ return [path, :apk] if path && !path.to_s.empty?
231
+
232
+ path = Actions.lane_context[SharedValues::GRADLE_AAB_OUTPUT_PATH]
233
+ return [path, :aab] if path && !path.to_s.empty?
234
+
235
+ path = Actions.lane_context[SharedValues::IPA_OUTPUT_PATH]
236
+ return [path, :ipa] if path && !path.to_s.empty?
237
+
238
+ UI.user_error!("One of xcarchive_path, apk_path, aab_path, or ipa_path must be provided")
239
+ end
240
+ end
241
+
242
+ def self.upload_dsym_if_requested(params, build_type)
243
+ dsym_paths = Array(params[:dsym_path]).reject { |p| p.nil? || p.to_s.empty? }
244
+ # For iOS builds, use DSYM_OUTPUT_PATH from lane context when dsym_path not specified
245
+ if dsym_paths.empty? && [:ipa, :xcarchive].include?(build_type)
246
+ dsym_from_context = Actions.lane_context[SharedValues::DSYM_OUTPUT_PATH]
247
+ dsym_paths = [dsym_from_context] if dsym_from_context && !dsym_from_context.to_s.empty?
248
+ end
249
+ return if dsym_paths.empty?
250
+
251
+ uploaded_count = 0
252
+ dsym_paths.each do |path|
253
+ next unless File.exist?(path)
254
+
255
+ command = ["debug-files", "upload", File.absolute_path(path), "--type", "dsym"]
256
+ Helper::SentryHelper.call_sentry_cli(params, command)
257
+ uploaded_count += 1
258
+ end
259
+ if uploaded_count > 0
260
+ UI.success("Successfully uploaded dSYM files")
261
+ elsif dsym_paths.any?
262
+ UI.verbose("No dSYM files were uploaded: none of the specified paths exist (#{dsym_paths.join(', ')})")
263
+ end
264
+ end
220
265
  end
221
266
  end
222
267
  end
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module Sentry
3
- VERSION = "2.1.0"
3
+ VERSION = "2.2.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane-plugin-sentry
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0
4
+ version: 2.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sentry
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-02-10 00:00:00.000000000 Z
11
+ date: 2026-03-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: os