fastlane-plugin-sentry 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 +7 -0
- data/LICENSE +21 -0
- data/README.md +288 -0
- data/bin/sentry-cli-Darwin-universal +0 -0
- data/bin/sentry-cli-Linux-i686 +0 -0
- data/bin/sentry-cli-Linux-x86_64 +0 -0
- data/bin/sentry-cli-Windows-i686.exe +0 -0
- data/bin/sentry-cli-Windows-x86_64.exe +0 -0
- data/lib/fastlane/plugin/sentry/actions/sentry_check_cli_installed.rb +41 -0
- data/lib/fastlane/plugin/sentry/actions/sentry_create_deploy.rb +98 -0
- data/lib/fastlane/plugin/sentry/actions/sentry_create_release.rb +77 -0
- data/lib/fastlane/plugin/sentry/actions/sentry_debug_files_upload.rb +162 -0
- data/lib/fastlane/plugin/sentry/actions/sentry_finalize_release.rb +75 -0
- data/lib/fastlane/plugin/sentry/actions/sentry_set_commits.rb +99 -0
- data/lib/fastlane/plugin/sentry/actions/sentry_upload_build.rb +132 -0
- data/lib/fastlane/plugin/sentry/actions/sentry_upload_proguard.rb +88 -0
- data/lib/fastlane/plugin/sentry/actions/sentry_upload_sourcemap.rb +209 -0
- data/lib/fastlane/plugin/sentry/helper/sentry_config.rb +100 -0
- data/lib/fastlane/plugin/sentry/helper/sentry_helper.rb +87 -0
- data/lib/fastlane/plugin/sentry/version.rb +5 -0
- data/lib/fastlane/plugin/sentry.rb +16 -0
- metadata +152 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: 408b09f0cc6da0272b4c77e75f6e1ea49fcbc50f5983f6f0210956eacb1e4ebc
|
|
4
|
+
data.tar.gz: ecac9411e28c1af2e9374160b20d43641b39d8bcca1ac1a29362cfe18e7bf3aa
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: 00fa2b4a6df3ea509e1719d3b24e3d2192ab9dcae42430710e3f25a1a4dad15d78e4a0c543362a311a080fbeb51832cbaa75a51f1b6639e038f4c672c044bf2b
|
|
7
|
+
data.tar.gz: 85b72e5e2075b558a6d9d58586ef2ea2842af4019fb95078d82934fdf6470d412b5369182e6bf546bc69d5e435ebc1bcfbe1ea2166fa23dae623320fe5c8aa96
|
data/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2017 Sentry
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
data/README.md
ADDED
|
@@ -0,0 +1,288 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<a href="https://sentry.io" target="_blank" align="center">
|
|
3
|
+
<img src="https://sentry-brand.storage.googleapis.com/sentry-logo-black.png" width="280">
|
|
4
|
+
</a>
|
|
5
|
+
<br/>
|
|
6
|
+
<h1>Sentry Fastlane Plugin</h1>
|
|
7
|
+
</p>
|
|
8
|
+
|
|
9
|
+
[](https://rubygems.org/gems/fastlane-plugin-sentry)
|
|
10
|
+
[](https://github.com/getsentry/sentry-fastlane/actions?query=workflow%3A"test")
|
|
11
|
+
[](https://badge.fury.io/rb/fastlane-plugin-sentry)
|
|
12
|
+
|
|
13
|
+
## Getting Started
|
|
14
|
+
|
|
15
|
+
This project is a [fastlane](https://github.com/fastlane/fastlane) plugin. To get started with fastlane-plugin-sentry, you can either add it globally for all projects, or locally to an individual project.
|
|
16
|
+
|
|
17
|
+
### Globally
|
|
18
|
+
|
|
19
|
+
If you install the gem globally, you can run it with any project that is setup for using `fastlane`.
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
gem install fastlane-plugin-sentry
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Add the actions you want to use to your `Fastfile` file and call `fastlane` to run.
|
|
26
|
+
|
|
27
|
+
### Locally
|
|
28
|
+
|
|
29
|
+
You can also add the plugin for individual projects. Navigate to your project where `fastlane` is already set up and run the following command:
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
bundle exec fastlane add_plugin sentry
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Fastlane will guide you through the process. It will add a `Pluginfile` where the sentry plugin is listed and also update the `Gemfile` and `Gemfile.lock` to include it as a dependency.
|
|
36
|
+
|
|
37
|
+
```ruby
|
|
38
|
+
# Autogenerated by fastlane
|
|
39
|
+
#
|
|
40
|
+
# Ensure this file is checked in to source control!
|
|
41
|
+
|
|
42
|
+
gem 'fastlane-plugin-sentry'
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Add the actions you want to use to your `Fastfile` file and call `bundle exec fastlane` to run.
|
|
46
|
+
|
|
47
|
+
## Sentry Actions
|
|
48
|
+
|
|
49
|
+
A subset of actions provided by the CLI: https://docs.sentry.io/learn/cli/
|
|
50
|
+
|
|
51
|
+
### Authentication & Configuration
|
|
52
|
+
|
|
53
|
+
`auth_token` is the authentication method with Sentry. This can be obtained on https://sentry.io/api/.
|
|
54
|
+
Also note that as of version `1.2.0` you no longer have to provide the required parameters, we will try to fallback to your `.sentryclirc` config file if possible.
|
|
55
|
+
|
|
56
|
+
The following environment variables may be used in place of parameters: `SENTRY_AUTH_TOKEN`, `SENTRY_ORG_SLUG`, and `SENTRY_PROJECT_SLUG`.
|
|
57
|
+
|
|
58
|
+
### Uploading Debug Information Files
|
|
59
|
+
|
|
60
|
+
```ruby
|
|
61
|
+
sentry_debug_files_upload(
|
|
62
|
+
auth_token: '...',
|
|
63
|
+
org_slug: '...',
|
|
64
|
+
project_slug: '...',
|
|
65
|
+
path: '/path/to/files', # Optional. Defaults to DSYM_OUTPUT_PATH from fastlane context if available, otherwise '.' (current directory). Path(s) can be a string, a comma-separated string, or an array of strings.
|
|
66
|
+
)
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
The `SENTRY_DSYM_PATH` environment variable may be used in place of the `dsym_path` parameter.
|
|
70
|
+
|
|
71
|
+
Further options:
|
|
72
|
+
|
|
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.
|
|
78
|
+
- __require_all__: Optional. Errors if not all identifiers specified with --id could be found.
|
|
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.
|
|
80
|
+
- __derived_data__: Optional. Search for debug symbols in Xcode's derived data.
|
|
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.
|
|
83
|
+
- __include_sources__: Optional. Include sources from the local file system and upload them as source bundles.
|
|
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.
|
|
87
|
+
|
|
88
|
+
### Uploading iOS Build Archives
|
|
89
|
+
|
|
90
|
+
Upload iOS build archives (.xcarchive) to Sentry for improved symbolication and source context.
|
|
91
|
+
|
|
92
|
+
```ruby
|
|
93
|
+
sentry_upload_build(
|
|
94
|
+
auth_token: '...',
|
|
95
|
+
org_slug: '...',
|
|
96
|
+
project_slug: '...',
|
|
97
|
+
xcarchive_path: './build/MyApp.xcarchive', # Path to your .xcarchive file
|
|
98
|
+
# Optional git context parameters (can also be set via environment variables)
|
|
99
|
+
head_sha: 'abc123...', # The SHA of the head of the current branch (or SENTRY_HEAD_SHA)
|
|
100
|
+
base_sha: 'def456...', # The SHA of the base branch (or SENTRY_BASE_SHA)
|
|
101
|
+
vcs_provider: 'github', # Version control system provider (e.g., 'github', 'gitlab') (or SENTRY_VCS_PROVIDER)
|
|
102
|
+
head_repo_name: 'owner/repo-name', # Name of the head repository (or SENTRY_HEAD_REPO_NAME)
|
|
103
|
+
base_repo_name: 'owner/repo-name', # Name of the base repository (or SENTRY_BASE_REPO_NAME)
|
|
104
|
+
head_ref: 'feature-branch', # Name of the head branch (or SENTRY_HEAD_REF)
|
|
105
|
+
base_ref: 'main', # Name of the base branch (or SENTRY_BASE_REF)
|
|
106
|
+
pr_number: '123', # Pull request number (or SENTRY_PR_NUMBER)
|
|
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
|
|
111
|
+
)
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
By default the `SharedValue::XCODEBUILD_ARCHIVE` sets the `xcarchive_path` parameter if set by a prior lane such as `build_app`.
|
|
115
|
+
|
|
116
|
+
This action is only supported on iOS platform.
|
|
117
|
+
|
|
118
|
+
### Creating & Finalizing Releases
|
|
119
|
+
|
|
120
|
+
```ruby
|
|
121
|
+
sentry_create_release(
|
|
122
|
+
auth_token: '...',
|
|
123
|
+
org_slug: '...',
|
|
124
|
+
project_slug: '...',
|
|
125
|
+
version: '...', # release version to create
|
|
126
|
+
app_identifier: '...', # pass in the bundle_identifer of your app
|
|
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
|
|
129
|
+
)
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
### Uploading Files & Sourcemaps
|
|
133
|
+
|
|
134
|
+
Useful for uploading build artifacts and JS sourcemaps for react-native apps built using fastlane.
|
|
135
|
+
|
|
136
|
+
```ruby
|
|
137
|
+
sentry_upload_sourcemap(
|
|
138
|
+
auth_token: '...',
|
|
139
|
+
org_slug: '...',
|
|
140
|
+
project_slug: '...',
|
|
141
|
+
version: '...',
|
|
142
|
+
app_identifier: '...', # pass in the bundle_identifer of your app
|
|
143
|
+
build: '...', # Optionally pass in the build number of your app
|
|
144
|
+
dist: '...', # optional distribution of the release usually the buildnumber
|
|
145
|
+
sourcemap: ['main.jsbundle', 'main.jsbundle.map'], # Sourcemap(s) to upload. Path(s) can be a comma-separated string or an array of strings.
|
|
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
|
|
155
|
+
)
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
### Uploading Proguard Mapping File
|
|
159
|
+
|
|
160
|
+
```ruby
|
|
161
|
+
sentry_upload_proguard(
|
|
162
|
+
auth_token: '...',
|
|
163
|
+
org_slug: '...',
|
|
164
|
+
project_slug: '...',
|
|
165
|
+
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
|
|
170
|
+
)
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
### Associating commits
|
|
174
|
+
|
|
175
|
+
Useful for telling Sentry which commits are associated with a release.
|
|
176
|
+
|
|
177
|
+
```ruby
|
|
178
|
+
sentry_set_commits(
|
|
179
|
+
version: '...',
|
|
180
|
+
app_identifier: '...', # pass in the bundle_identifer of your app
|
|
181
|
+
build: '...', # Optionally pass in the build number of your app
|
|
182
|
+
auto: false, # enable completely automated commit management
|
|
183
|
+
clear: false, # clear all current commits from the release
|
|
184
|
+
commit: '...', # commit spec, see `sentry-cli releases help set-commits` for more information
|
|
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)
|
|
188
|
+
)
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
### Create deploy
|
|
192
|
+
|
|
193
|
+
Creates a new release deployment for a project on Sentry.
|
|
194
|
+
|
|
195
|
+
```ruby
|
|
196
|
+
sentry_create_deploy(
|
|
197
|
+
auth_token: '...',
|
|
198
|
+
org_slug: '...',
|
|
199
|
+
project_slug: '...',
|
|
200
|
+
version: '...',
|
|
201
|
+
app_identifier: '...', # pass in the bundle_identifer of your app
|
|
202
|
+
build: '...', # Optionally pass in the build number of your app
|
|
203
|
+
env: 'staging', # The environment for this deploy. Required.
|
|
204
|
+
name: '...', # Optional human readable name
|
|
205
|
+
deploy_url: '...', # Optional URL that points to the deployment
|
|
206
|
+
started: 1622630647, # Optional unix timestamp when the deployment started
|
|
207
|
+
finished: 1622630700, # Optional unix timestamp when the deployment finished
|
|
208
|
+
time: 180 # Optional deployment duration in seconds. This can be specified alternatively to `started` and `finished`
|
|
209
|
+
)
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
### Specify custom sentry-cli path
|
|
213
|
+
|
|
214
|
+
Starting with version `1.13.0`, the plugin bundles both macOS and Windows 64 bit executables of `sentry-cli`. You can also specify a custom `sentry-cli` path by adding `sentry_cli_path` to any action.
|
|
215
|
+
|
|
216
|
+
### Checking the sentry-cli is installed
|
|
217
|
+
|
|
218
|
+
Useful for checking that the sentry-cli is installed and meets the minimum version requirements before starting to build your app in your lane.
|
|
219
|
+
|
|
220
|
+
```ruby
|
|
221
|
+
sentry_check_cli_installed()
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
### Logging
|
|
225
|
+
|
|
226
|
+
You can set the `sentry-cli` [configuration value](https://docs.sentry.io/product/cli/configuration/#configuration-values) `SENTRY_LOG_LEVEL` by adding `log_level` to any action. Supported values are 'trace', 'debug', 'info', 'warn' and 'error'.
|
|
227
|
+
|
|
228
|
+
## Issues and Feedback
|
|
229
|
+
|
|
230
|
+
For any other issues and feedback about this plugin, please submit it to this repository.
|
|
231
|
+
|
|
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
|
+
|
|
278
|
+
## Troubleshooting
|
|
279
|
+
|
|
280
|
+
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.
|
|
281
|
+
|
|
282
|
+
## Using `fastlane` Plugins
|
|
283
|
+
|
|
284
|
+
For more information about how the `fastlane` plugin system works, check out the [Plugins documentation](https://docs.fastlane.tools/plugins/create-plugin/) in the main `fastlane` repo.
|
|
285
|
+
|
|
286
|
+
## About `fastlane`
|
|
287
|
+
|
|
288
|
+
`fastlane` automates building, testing, and releasing your app for beta and app store distributions. To learn more about `fastlane`, check out [fastlane.tools](https://fastlane.tools).
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
module Fastlane
|
|
2
|
+
module Actions
|
|
3
|
+
class SentryCheckCliInstalledAction < Action
|
|
4
|
+
def self.run(params)
|
|
5
|
+
Helper::SentryHelper.find_and_check_sentry_cli_path!(params)
|
|
6
|
+
UI.success("Successfully checked that sentry-cli is installed")
|
|
7
|
+
end
|
|
8
|
+
|
|
9
|
+
#####################################################
|
|
10
|
+
# @!group Documentation
|
|
11
|
+
#####################################################
|
|
12
|
+
|
|
13
|
+
def self.description
|
|
14
|
+
"Checks that sentry-cli with the correct version is installed"
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
def self.details
|
|
18
|
+
[
|
|
19
|
+
"This action checks that the senty-cli is installed and meets the mimum verson requirements.",
|
|
20
|
+
"You can use it at the start of your lane to ensure that sentry-cli is correctly installed."
|
|
21
|
+
].join(" ")
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
def self.return_value
|
|
25
|
+
nil
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
def self.authors
|
|
29
|
+
["matt-oakes"]
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
def self.is_supported?(platform)
|
|
33
|
+
true
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
def self.available_options
|
|
37
|
+
Helper::SentryConfig.common_cli_config_items
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
end
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
module Fastlane
|
|
2
|
+
module Actions
|
|
3
|
+
class SentryCreateDeployAction < Action
|
|
4
|
+
def self.run(params)
|
|
5
|
+
require 'shellwords'
|
|
6
|
+
|
|
7
|
+
Helper::SentryConfig.parse_api_params(params)
|
|
8
|
+
|
|
9
|
+
version = params[:version]
|
|
10
|
+
version = "#{params[:app_identifier]}@#{params[:version]}" if params[:app_identifier]
|
|
11
|
+
version = "#{version}+#{params[:build]}" if params[:build]
|
|
12
|
+
|
|
13
|
+
command = [
|
|
14
|
+
"releases",
|
|
15
|
+
"deploys",
|
|
16
|
+
version,
|
|
17
|
+
"new"
|
|
18
|
+
]
|
|
19
|
+
command.push('--env').push(params[:env]) unless params[:env].nil?
|
|
20
|
+
command.push('--name').push(params[:name]) unless params[:name].nil?
|
|
21
|
+
command.push('--url').push(params[:deploy_url]) unless params[:deploy_url].nil?
|
|
22
|
+
command.push('--started').push(params[:started]) unless params[:started].nil?
|
|
23
|
+
command.push('--finished').push(params[:finished]) unless params[:finished].nil?
|
|
24
|
+
command.push('--time').push(params[:time]) unless params[:time].nil?
|
|
25
|
+
|
|
26
|
+
Helper::SentryHelper.call_sentry_cli(params, command)
|
|
27
|
+
UI.success("Successfully created deploy: #{version}")
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
#####################################################
|
|
31
|
+
# @!group Documentation
|
|
32
|
+
#####################################################
|
|
33
|
+
|
|
34
|
+
def self.description
|
|
35
|
+
"Creates a new release deployment for a project on Sentry"
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
def self.details
|
|
39
|
+
[
|
|
40
|
+
"This action allows you to associate deploys to releases for a project on Sentry.",
|
|
41
|
+
"See https://docs.sentry.io/product/cli/releases/#creating-deploys for more information."
|
|
42
|
+
].join(" ")
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
def self.available_options
|
|
46
|
+
Helper::SentryConfig.common_api_config_items + [
|
|
47
|
+
FastlaneCore::ConfigItem.new(key: :version,
|
|
48
|
+
description: "Release version to associate the deploy with on Sentry"),
|
|
49
|
+
FastlaneCore::ConfigItem.new(key: :app_identifier,
|
|
50
|
+
short_option: "-a",
|
|
51
|
+
env_name: "SENTRY_APP_IDENTIFIER",
|
|
52
|
+
description: "App Bundle Identifier, prepended with the version.\nFor example bundle@version",
|
|
53
|
+
optional: true),
|
|
54
|
+
FastlaneCore::ConfigItem.new(key: :build,
|
|
55
|
+
short_option: "-b",
|
|
56
|
+
description: "Release build to associate the deploy with on Sentry",
|
|
57
|
+
optional: true),
|
|
58
|
+
FastlaneCore::ConfigItem.new(key: :env,
|
|
59
|
+
short_option: "-e",
|
|
60
|
+
description: "Set the environment for this release. This argument is required. Values that make sense here would be 'production' or 'staging'",
|
|
61
|
+
optional: false),
|
|
62
|
+
FastlaneCore::ConfigItem.new(key: :name,
|
|
63
|
+
short_option: "-n",
|
|
64
|
+
description: "Optional human readable name for this deployment",
|
|
65
|
+
optional: true),
|
|
66
|
+
FastlaneCore::ConfigItem.new(key: :deploy_url,
|
|
67
|
+
description: "Optional URL that points to the deployment",
|
|
68
|
+
optional: true),
|
|
69
|
+
FastlaneCore::ConfigItem.new(key: :started,
|
|
70
|
+
description: "Optional unix timestamp when the deployment started",
|
|
71
|
+
is_string: false,
|
|
72
|
+
optional: true),
|
|
73
|
+
FastlaneCore::ConfigItem.new(key: :finished,
|
|
74
|
+
description: "Optional unix timestamp when the deployment finished",
|
|
75
|
+
is_string: false,
|
|
76
|
+
optional: true),
|
|
77
|
+
FastlaneCore::ConfigItem.new(key: :time,
|
|
78
|
+
short_option: "-t",
|
|
79
|
+
description: "Optional deployment duration in seconds. This can be specified alternatively to `started` and `finished`",
|
|
80
|
+
is_string: false,
|
|
81
|
+
optional: true)
|
|
82
|
+
]
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
def self.return_value
|
|
86
|
+
nil
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
def self.authors
|
|
90
|
+
["denrase"]
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
def self.is_supported?(platform)
|
|
94
|
+
true
|
|
95
|
+
end
|
|
96
|
+
end
|
|
97
|
+
end
|
|
98
|
+
end
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
module Fastlane
|
|
2
|
+
module Actions
|
|
3
|
+
class SentryCreateReleaseAction < Action
|
|
4
|
+
def self.run(params)
|
|
5
|
+
require 'shellwords'
|
|
6
|
+
|
|
7
|
+
Helper::SentryConfig.parse_api_params(params)
|
|
8
|
+
|
|
9
|
+
version = params[:version]
|
|
10
|
+
version = "#{params[:app_identifier]}@#{params[:version]}" if params[:app_identifier]
|
|
11
|
+
version = "#{version}+#{params[:build]}" if params[:build]
|
|
12
|
+
|
|
13
|
+
command = [
|
|
14
|
+
"releases",
|
|
15
|
+
"new",
|
|
16
|
+
version
|
|
17
|
+
]
|
|
18
|
+
command.push("--finalize") if params[:finalize] == true
|
|
19
|
+
command.push("--url").push(params[:release_url]) unless params[:release_url].nil?
|
|
20
|
+
|
|
21
|
+
Helper::SentryHelper.call_sentry_cli(params, command)
|
|
22
|
+
UI.success("Successfully created release: #{version}")
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
#####################################################
|
|
26
|
+
# @!group Documentation
|
|
27
|
+
#####################################################
|
|
28
|
+
|
|
29
|
+
def self.description
|
|
30
|
+
"Create new releases for a project on Sentry"
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
def self.details
|
|
34
|
+
[
|
|
35
|
+
"This action allows you to create new releases for a project on Sentry.",
|
|
36
|
+
"See https://docs.sentry.io/learn/cli/releases/#creating-releases for more information."
|
|
37
|
+
].join(" ")
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
def self.available_options
|
|
41
|
+
Helper::SentryConfig.common_api_config_items + [
|
|
42
|
+
FastlaneCore::ConfigItem.new(key: :version,
|
|
43
|
+
description: "Release version to create on Sentry"),
|
|
44
|
+
FastlaneCore::ConfigItem.new(key: :app_identifier,
|
|
45
|
+
short_option: "-a",
|
|
46
|
+
env_name: "SENTRY_APP_IDENTIFIER",
|
|
47
|
+
description: "App Bundle Identifier, prepended to version",
|
|
48
|
+
optional: true),
|
|
49
|
+
FastlaneCore::ConfigItem.new(key: :build,
|
|
50
|
+
short_option: "-b",
|
|
51
|
+
description: "Release build to create on Sentry",
|
|
52
|
+
optional: true),
|
|
53
|
+
FastlaneCore::ConfigItem.new(key: :finalize,
|
|
54
|
+
description: "Whether to finalize the release. If not provided or false, the release can be finalized using the finalize_release action",
|
|
55
|
+
default_value: false,
|
|
56
|
+
is_string: false,
|
|
57
|
+
optional: true),
|
|
58
|
+
FastlaneCore::ConfigItem.new(key: :release_url,
|
|
59
|
+
description: "Optional URL to the release for information purposes",
|
|
60
|
+
optional: true)
|
|
61
|
+
]
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
def self.return_value
|
|
65
|
+
nil
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
def self.authors
|
|
69
|
+
["wschurman"]
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
def self.is_supported?(platform)
|
|
73
|
+
true
|
|
74
|
+
end
|
|
75
|
+
end
|
|
76
|
+
end
|
|
77
|
+
end
|