Skip to content

Commit 983a1e6

Browse files
authored
feat: Add missing sentry-cli v3 options to all actions (#382)
- Add all missing options from sentry-cli v3.0.1 to match CLI capabilities - Fix parameter name: ids -> id in sentry_debug_files_upload - Remove deprecated options: info_plist, no_reprocessing, upload_symbol_maps - Update type validation to include jvm, portablepdb, wasm - Add comprehensive migration guide to README - Update CHANGELOG with breaking changes and new features
1 parent 0e37298 commit 983a1e6

16 files changed

+599
-65
lines changed

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,22 @@ Due to sentry-cli 3.0.0 upgrade, the following breaking changes have been made (
1313
- **`force_foreground` parameter has been removed**: This parameter was deprecated as a no-op since v1.26.0 and has now been removed from `sentry_debug_files_upload`. Users should remove this parameter from their Fastfiles. ([#376](https://github.com/getsentry/sentry-fastlane-plugin/pull/376))
1414
- **`sentry_upload_dsym` action has been removed**: This action has been deprecated in favor of `sentry_debug_files_upload`. Users should migrate to `sentry_debug_files_upload` with the appropriate `path` parameter. ([#375](https://github.com/getsentry/sentry-fastlane-plugin/pull/375))
1515
- **`sentry_upload_dif` action has been removed**: This action has been deprecated in favor of `sentry_debug_files_upload`. Users should migrate to `sentry_debug_files_upload` with the appropriate `path` parameter. ([#375](https://github.com/getsentry/sentry-fastlane-plugin/pull/375))
16+
- **`ids` parameter renamed to `id` in `sentry_debug_files_upload`**: The parameter has been renamed from `ids` to `id` to match sentry-cli v3. Users should update their Fastfiles to use `id` instead of `ids`.
17+
- **Removed deprecated parameters from `sentry_debug_files_upload`**: The following parameters have been removed as they are no longer supported in sentry-cli v3: `info_plist`, `no_reprocessing`, `upload_symbol_maps`. Users should remove these parameters from their Fastfiles.
1618

1719
See the [sentry-cli 3.0.0 release notes](https://github.com/getsentry/sentry-cli/releases/tag/3.0.0) for more details on CLI changes.
1820

1921
### Features
2022

2123
- Set `SENTRY_PIPELINE` environment variable for all sentry-cli invocations to identify the plugin and version ([#365](https://github.com/getsentry/sentry-fastlane-plugin/pull/365))
24+
- **Added missing sentry-cli v3 options to all actions**: All actions have been updated to support all available options from sentry-cli version 3.0.1:
25+
- **`sentry_debug_files_upload`**: Added `wait_for`, `no_upload`, `il2cpp_mapping` options. Fixed `id` parameter (was `ids`). Updated type validation to include `jvm`, `portablepdb`, and `wasm` types. Removed deprecated options (`info_plist`, `no_reprocessing`, `upload_symbol_maps`) that are no longer supported in sentry-cli v3. (#382)
26+
- **`sentry_upload_sourcemap`**: Added `url_suffix`, `note`, `validate`, `decompress`, `wait`, `wait_for`, `no_sourcemap_reference`, `debug_id_reference`, `bundle`, `bundle_sourcemap`, `ext` (array support), and `strict` options.
27+
- **`sentry_upload_proguard`**: Added `no_upload`, `write_properties`, `require_one`, and `uuid` options.
28+
- **`sentry_upload_build`**: Added `release_notes`, `force_git_metadata`, and `no_git_metadata` options.
29+
- **`sentry_create_release`**: Added `url` option.
30+
- **`sentry_finalize_release`**: Added `url` and `released` options.
31+
- **`sentry_set_commits`**: Added `local` and `initial_depth` options.
2232

2333
### Improvements
2434

README.md

Lines changed: 79 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -70,20 +70,20 @@ The `SENTRY_DSYM_PATH` environment variable may be used in place of the `dsym_pa
7070

7171
Further options:
7272

73-
- __type__: Optional. Only consider debug information files of the given type. By default, all types are considered. Valid options: 'dsym', 'elf', 'breakpad', 'pdb', 'pe', 'sourcebundle', 'bcsymbolmap'.
74-
- __no_unwind__: Optional. Do not scan for stack unwinding information. Specify this flag for builds with disabled FPO, or when stackwalking occurs on the device. This usually excludes executables and dynamic libraries. They might still be uploaded, if they contain additional processable information (see other flags)".
75-
- __no_debug__: Optional. Do not scan for debugging information. This will usually exclude debug companion files. They might still be uploaded, if they contain additional processable information (see other flags)".
76-
- __no_sources__: Optional. "Do not scan for source information. This will usually exclude source bundle files. They might still be uploaded, if they contain additional processable information (see other flags)".
77-
- __ids__: Optional. Search for specific debug identifiers.
73+
- __type__: Optional. Only consider debug information files of the given type. By default, all types are considered. Valid options: 'bcsymbolmap', 'breakpad', 'dsym', 'elf', 'jvm', 'pdb', 'pe', 'portablepdb', 'sourcebundle', 'wasm'.
74+
- __no_unwind__: Optional. Do not scan for stack unwinding information. Specify this flag for builds with disabled FPO, or when stackwalking occurs on the device. This usually excludes executables and dynamic libraries. They might still be uploaded, if they contain additional processable information (see other flags).
75+
- __no_debug__: Optional. Do not scan for debugging information. This will usually exclude debug companion files. They might still be uploaded, if they contain additional processable information (see other flags).
76+
- __no_sources__: Optional. Do not scan for source information. This will usually exclude source bundle files. They might still be uploaded, if they contain additional processable information (see other flags).
77+
- __id__: Optional. Search for specific debug identifiers.
7878
- __require_all__: Optional. Errors if not all identifiers specified with --id could be found.
79-
- __symbol_maps__: Optional. Optional path to BCSymbolMap files which are used to resolve hidden symbols in dSYM files downloaded from iTunes Connect. This requires the dsymutil tool to be available.
79+
- __symbol_maps__: Optional. Path to BCSymbolMap files which are used to resolve hidden symbols in dSYM files downloaded from iTunes Connect. This requires the dsymutil tool to be available.
8080
- __derived_data__: Optional. Search for debug symbols in Xcode's derived data.
81-
- __no_zips__: Do not search in ZIP files.
82-
- __info_plist__: Optional. Optional path to the Info.plist. We will try to find this automatically if run from Xcode. Providing this information will associate the debug symbols with a specific ITC application and build in Sentry. Note that if you provide the plist explicitly it must already be processed.
83-
- __no_reprocessing__: Optional. Do not trigger reprocessing after uploading.
81+
- __no_zips__: Optional. Do not search in ZIP files.
82+
- __no_upload__: Optional. Disable the actual upload. This runs all steps for the processing but does not trigger the upload. This is useful if you just want to verify the setup or skip the upload in tests.
8483
- __include_sources__: Optional. Include sources from the local file system and upload them as source bundles.
85-
- __wait__: Wait for the server to fully process uploaded files. Errors can only be displayed if --wait is specified, but this will significantly slow down the upload process.
86-
- __upload_symbol_maps__: Optional. Upload any BCSymbolMap files found to allow Sentry to resolve hidden symbols, e.g. when it downloads dSYMs directly from App Store Connect or when you upload dSYMs without first resolving the hidden symbols using --symbol-maps.
84+
- __wait__: Optional. Wait for the server to fully process uploaded files. Errors can only be displayed if --wait or --wait-for is specified, but this will significantly slow down the upload process.
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+
- __il2cpp_mapping__: Optional. Compute il2cpp line mappings and upload them along with sources.
8787

8888
### Uploading iOS Build Archives
8989

@@ -104,7 +104,10 @@ sentry_upload_build(
104104
head_ref: 'feature-branch', # Name of the head branch (or SENTRY_HEAD_REF)
105105
base_ref: 'main', # Name of the base branch (or SENTRY_BASE_REF)
106106
pr_number: '123', # Pull request number (or SENTRY_PR_NUMBER)
107-
build_configuration: 'Release' # Build configuration (e.g., 'Release', 'Debug') (or SENTRY_BUILD_CONFIGURATION)
107+
build_configuration: 'Release', # Build configuration (e.g., 'Release', 'Debug') (or SENTRY_BUILD_CONFIGURATION)
108+
release_notes: 'Fixed critical bugs', # Optional. Release notes to use for the upload
109+
force_git_metadata: false, # Optional. Force collection and sending of git metadata
110+
no_git_metadata: false # Optional. Disable collection and sending of git metadata
108111
)
109112
```
110113

@@ -121,7 +124,8 @@ sentry_create_release(
121124
project_slug: '...',
122125
version: '...', # release version to create
123126
app_identifier: '...', # pass in the bundle_identifer of your app
124-
finalize: true # Whether to finalize the release. If not provided or false, the release can be finalized using the sentry_finalize_release action
127+
finalize: true, # Whether to finalize the release. If not provided or false, the release can be finalized using the sentry_finalize_release action
128+
release_url: 'https://github.com/owner/repo/releases/tag/v1.0.0' # Optional. URL to the release for information purposes
125129
)
126130
```
127131

@@ -139,7 +143,15 @@ sentry_upload_sourcemap(
139143
build: '...', # Optionally pass in the build number of your app
140144
dist: '...', # optional distribution of the release usually the buildnumber
141145
sourcemap: ['main.jsbundle', 'main.jsbundle.map'], # Sourcemap(s) to upload. Path(s) can be a comma-separated string or an array of strings.
142-
rewrite: true
146+
rewrite: true, # Rewrite the sourcemaps before upload (default: false)
147+
url_prefix: '~/', # Optional. Sets a URL prefix in front of all files
148+
url_suffix: '.map', # Optional. Sets a URL suffix to append to all filenames
149+
note: 'Build from CI', # Optional. Adds a note to the uploaded artifact bundle
150+
validate: true, # Optional. Enable basic sourcemap validation
151+
decompress: true, # Optional. Enable files gzip decompression prior to upload
152+
wait: true, # Optional. Wait for the server to fully process uploaded files
153+
wait_for: 60, # Optional. Wait for the server to fully process uploaded files, but at most for the given number of seconds
154+
strict: true # Optional. Fail with a non-zero exit code if the specified source map file cannot be uploaded
143155
)
144156
```
145157

@@ -150,8 +162,11 @@ sentry_upload_proguard(
150162
auth_token: '...',
151163
org_slug: '...',
152164
project_slug: '...',
153-
android_manifest_path: 'path to merged AndroidManifest file', # found in `app/build/intermediates/manifests/full`
154165
mapping_path: 'path to mapping.txt to upload',
166+
no_upload: false, # Optional. Disable the actual upload (useful for verification)
167+
write_properties: 'path/to/properties/file', # Optional. Write UUIDs for processed mapping files into properties file
168+
require_one: true, # Optional. Require at least one file to upload or the command will error
169+
uuid: 'custom-uuid' # Optional. Explicitly override the UUID of the mapping file
155170
)
156171
```
157172

@@ -167,7 +182,9 @@ sentry_set_commits(
167182
auto: false, # enable completely automated commit management
168183
clear: false, # clear all current commits from the release
169184
commit: '...', # commit spec, see `sentry-cli releases help set-commits` for more information
170-
ignore_missing: false # Optional boolean value: When the flag is set and the previous release commit was not found in the repository, will create a release with the default commits count (or the one specified with `--initial-depth`) instead of failing the command.
185+
ignore_missing: false, # Optional boolean value: When the flag is set and the previous release commit was not found in the repository, will create a release with the default commits count (or the one specified with `--initial-depth`) instead of failing the command.
186+
local: false, # Optional. Set commits of a release from local git
187+
initial_depth: 20 # Optional. Set the number of commits of the initial release (default: 20)
171188
)
172189
```
173190

@@ -212,6 +229,52 @@ You can set the `sentry-cli` [configuration value](https://docs.sentry.io/produc
212229

213230
For any other issues and feedback about this plugin, please submit it to this repository.
214231

232+
## Migration Guide
233+
234+
### Migrating from sentry-fastlane-plugin v1 to v2
235+
236+
When upgrading to the latest version of this plugin (which uses sentry-cli v3), you may need to update your Fastfiles. Here are the key changes:
237+
238+
#### Parameter Name Changes
239+
240+
- **`sentry_debug_files_upload`**: The `ids` parameter has been renamed to `id` (singular). Update your Fastfiles:
241+
```ruby
242+
# Before
243+
sentry_debug_files_upload(ids: 'abc123')
244+
245+
# After
246+
sentry_debug_files_upload(id: 'abc123')
247+
```
248+
249+
#### Removed Parameters
250+
251+
The following parameters have been removed as they are no longer supported in sentry-cli v3:
252+
253+
- **`sentry_debug_files_upload`**: Remove `info_plist`, `no_reprocessing`, and `upload_symbol_maps` parameters if you're using them.
254+
- **`sentry_upload_proguard`**: Remove `android_manifest_path` parameter if you're using it (no longer needed).
255+
256+
#### New Available Options
257+
258+
Many new options have been added to match sentry-cli v3 capabilities. See the action documentation above for all available options. Some notable additions:
259+
260+
- **`sentry_debug_files_upload`**: Added `wait_for`, `no_upload`, `il2cpp_mapping` options. Type validation now includes `jvm`, `portablepdb`, and `wasm`.
261+
- **`sentry_upload_sourcemap`**: Added `url_suffix`, `note`, `validate`, `decompress`, `wait`, `wait_for`, `no_sourcemap_reference`, `debug_id_reference`, `bundle`, `bundle_sourcemap`, `ext`, and `strict` options.
262+
- **`sentry_upload_proguard`**: Added `no_upload`, `write_properties`, `require_one`, and `uuid` options.
263+
- **`sentry_upload_build`**: Added `release_notes`, `force_git_metadata`, and `no_git_metadata` options.
264+
- **`sentry_create_release`**: Added `url` option.
265+
- **`sentry_finalize_release`**: Added `url` and `released` options.
266+
- **`sentry_set_commits`**: Added `local` and `initial_depth` options.
267+
268+
#### Removed Actions
269+
270+
The following actions have been removed and replaced:
271+
272+
- **`sentry_upload_file`**: Use `sentry_upload_sourcemap` for source maps or other specialized upload actions.
273+
- **`sentry_upload_dsym`**: Use `sentry_debug_files_upload` with appropriate `path` parameter.
274+
- **`sentry_upload_dif`**: Use `sentry_debug_files_upload` with appropriate `path` parameter.
275+
276+
For more details on sentry-cli v3 changes, see the [sentry-cli 3.0.0 release notes](https://github.com/getsentry/sentry-cli/releases/tag/3.0.0).
277+
215278
## Troubleshooting
216279

217280
For some more detailed help with plugins problems, check out the [Plugins Troubleshooting](https://github.com/fastlane/fastlane/blob/master/fastlane/docs/PluginsTroubleshooting.md) doc in the main `fastlane` repo.

lib/fastlane/plugin/sentry/actions/sentry_create_release.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ def self.run(params)
1616
version
1717
]
1818
command.push("--finalize") if params[:finalize] == true
19+
command.push("--url").push(params[:release_url]) unless params[:release_url].nil?
1920

2021
Helper::SentryHelper.call_sentry_cli(params, command)
2122
UI.success("Successfully created release: #{version}")
@@ -53,6 +54,9 @@ def self.available_options
5354
description: "Whether to finalize the release. If not provided or false, the release can be finalized using the finalize_release action",
5455
default_value: false,
5556
is_string: false,
57+
optional: true),
58+
FastlaneCore::ConfigItem.new(key: :release_url,
59+
description: "Optional URL to the release for information purposes",
5660
optional: true)
5761
]
5862
end

0 commit comments

Comments
 (0)