fastlane-plugin-sentry 1.12.2 → 1.13.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 +4 -4
- data/README.md +31 -5
- data/bin/sentry-cli-Darwin-universal +0 -0
- data/bin/sentry-cli-Windows-x86_64.exe +0 -0
- data/bin/sentry_cli_path +9 -0
- data/lib/fastlane/plugin/sentry/actions/sentry_upload_sourcemap.rb +11 -8
- data/lib/fastlane/plugin/sentry/helper/sentry_config.rb +4 -2
- data/lib/fastlane/plugin/sentry/helper/sentry_helper.rb +28 -29
- data/lib/fastlane/plugin/sentry/version.rb +1 -2
- data/lib/fastlane/plugin/sentry.rb +1 -1
- metadata +27 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6ae029189f96f28c4c0e81d5427cad5fc32a22dc7223e6bb95f11dc4168f4e3e
|
4
|
+
data.tar.gz: a602515e84a17e78d912bf5477971ad032e41e310894c998447647fe9298c4ce
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d41ef68814ee11cc6ae5fa12ea7f77bcd332b7fece1df443176a59e937e8fc6dc5178e671d73559e969b86c9242e1731bb37fb3370ebf329a2db64c018f38877
|
7
|
+
data.tar.gz: c6697d4c92339bb72cc668f830b5e5ea6ffaef8ea150cb77f2cb62cf228d1349d183bfc0e950c5a6275b935c758e38a311de13e1525a2fb5c27649336533d148
|
data/README.md
CHANGED
@@ -12,12 +12,38 @@
|
|
12
12
|
|
13
13
|
## Getting Started
|
14
14
|
|
15
|
-
This project is a [fastlane](https://github.com/fastlane/fastlane) plugin. To get started with fastlane-plugin-sentry, add it to
|
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:
|
16
30
|
|
17
31
|
```bash
|
18
|
-
fastlane add_plugin sentry
|
32
|
+
bundle exec fastlane add_plugin sentry
|
19
33
|
```
|
20
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
|
+
|
21
47
|
## Sentry Actions
|
22
48
|
|
23
49
|
A subset of actions provided by the CLI: https://docs.sentry.io/learn/cli/
|
@@ -56,7 +82,7 @@ Further options:
|
|
56
82
|
- __derived_data__: Optional. Search for debug symbols in Xcode's derived data.
|
57
83
|
- __no_zips__: Do not search in ZIP files.
|
58
84
|
- __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.
|
59
|
-
- __no_reprocessing__: Optional. Do not trigger reprocessing after uploading.
|
85
|
+
- __no_reprocessing__: Optional. Do not trigger reprocessing after uploading.
|
60
86
|
- __force_foreground__: Optional. Wait for the process to finish. By default, the upload process will detach and continue in the background when triggered from Xcode. When an error happens, a dialog is shown. If this parameter is passed Xcode will wait for the process to finish before the build finishes and output will be shown in the Xcode build output.
|
61
87
|
- __include_sources__: Optional. Include sources from the local file system and upload them as source bundles.
|
62
88
|
- __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.
|
@@ -119,7 +145,7 @@ sentry_upload_sourcemap(
|
|
119
145
|
app_identifier: '...', # pass in the bundle_identifer of your app
|
120
146
|
build: '...', # Optionally pass in the build number of your app
|
121
147
|
dist: '...', # optional distribution of the release usually the buildnumber
|
122
|
-
sourcemap: 'main.jsbundle.map', #
|
148
|
+
sourcemap: 'main.jsbundle.map', # Sourcemap(s) to upload. Path(s) can be a comma-separated string or an array of strings.
|
123
149
|
rewrite: true
|
124
150
|
)
|
125
151
|
```
|
@@ -176,7 +202,7 @@ sentry_create_deploy(
|
|
176
202
|
|
177
203
|
### Specify custom sentry-cli path
|
178
204
|
|
179
|
-
|
205
|
+
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.
|
180
206
|
|
181
207
|
### Checking the sentry-cli is installed
|
182
208
|
|
Binary file
|
Binary file
|
data/bin/sentry_cli_path
ADDED
@@ -10,15 +10,15 @@ module Fastlane
|
|
10
10
|
version = "#{params[:app_identifier]}@#{params[:version]}" if params[:app_identifier]
|
11
11
|
version = "#{version}+#{params[:build]}" if params[:build]
|
12
12
|
|
13
|
-
|
13
|
+
sourcemaps = params[:sourcemap]
|
14
14
|
|
15
15
|
command = [
|
16
16
|
"releases",
|
17
17
|
"files",
|
18
18
|
version,
|
19
|
-
"upload-sourcemaps"
|
20
|
-
sourcemap.to_s
|
19
|
+
"upload-sourcemaps"
|
21
20
|
]
|
21
|
+
command += sourcemaps
|
22
22
|
|
23
23
|
command.push('--rewrite') if params[:rewrite]
|
24
24
|
command.push('--no-rewrite') unless params[:rewrite]
|
@@ -52,12 +52,12 @@ module Fastlane
|
|
52
52
|
#####################################################
|
53
53
|
|
54
54
|
def self.description
|
55
|
-
"Upload
|
55
|
+
"Upload one or more sourcemap(s) to a release of a project on Sentry"
|
56
56
|
end
|
57
57
|
|
58
58
|
def self.details
|
59
59
|
[
|
60
|
-
"This action allows you to upload
|
60
|
+
"This action allows you to upload one or more sourcemap(s) to a release of a project on Sentry.",
|
61
61
|
"See https://docs.sentry.io/learn/cli/releases/#upload-sourcemaps for more information."
|
62
62
|
].join(" ")
|
63
63
|
end
|
@@ -79,9 +79,12 @@ module Fastlane
|
|
79
79
|
description: "Distribution in release",
|
80
80
|
optional: true),
|
81
81
|
FastlaneCore::ConfigItem.new(key: :sourcemap,
|
82
|
-
description: "Path to the sourcemap to upload",
|
83
|
-
|
84
|
-
|
82
|
+
description: "Path or an array of paths to the sourcemap(s) to upload",
|
83
|
+
type: Array,
|
84
|
+
verify_block: proc do |values|
|
85
|
+
[*values].each do |value|
|
86
|
+
UI.user_error! "Could not find sourcemap at path '#{value}'" unless File.exist?(value)
|
87
|
+
end
|
85
88
|
end),
|
86
89
|
FastlaneCore::ConfigItem.new(key: :rewrite,
|
87
90
|
description: "Rewrite the sourcemaps before upload",
|
@@ -75,8 +75,10 @@ module Fastlane
|
|
75
75
|
if has_org && has_project
|
76
76
|
ENV['SENTRY_ORG'] = Shellwords.escape(org) unless org.to_s.empty?
|
77
77
|
ENV['SENTRY_PROJECT'] = Shellwords.escape(project) unless project.to_s.empty?
|
78
|
-
|
79
|
-
UI.important("
|
78
|
+
elsif !has_org
|
79
|
+
UI.important("Missing 'org_slug' parameter. Provide both 'org_slug' and 'project_slug'. Falling back to .sentryclirc")
|
80
|
+
elsif !has_project
|
81
|
+
UI.important("Missing 'project_slug' parameter. Provide both 'org_slug' and 'project_slug'. Falling back to .sentryclirc")
|
80
82
|
end
|
81
83
|
end
|
82
84
|
|
@@ -2,27 +2,19 @@ module Fastlane
|
|
2
2
|
module Helper
|
3
3
|
class SentryHelper
|
4
4
|
def self.find_and_check_sentry_cli_path!(params)
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
UI.error("Install it using:")
|
10
|
-
UI.command("brew install getsentry/tools/sentry-cli")
|
11
|
-
UI.error("OR")
|
12
|
-
UI.command("curl -sL https://sentry.io/get-cli/ | bash")
|
13
|
-
UI.error("If you don't have homebrew, visit http://brew.sh")
|
14
|
-
UI.user_error!("Install sentry-cli and start your lane again!")
|
15
|
-
end
|
5
|
+
bundled_sentry_cli_path = `bundle exec sentry_cli_path`
|
6
|
+
bundled_sentry_cli_version = Gem::Version.new(`#{bundled_sentry_cli_path} --version`.scan(/(?:\d+\.?){3}/).first)
|
7
|
+
|
8
|
+
sentry_cli_path = params[:sentry_cli_path] || bundled_sentry_cli_path
|
16
9
|
|
17
|
-
sentry_cli_version = Gem::Version.new(`#{
|
10
|
+
sentry_cli_version = Gem::Version.new(`#{sentry_cli_path} --version`.scan(/(?:\d+\.?){3}/).first)
|
18
11
|
|
19
|
-
|
20
|
-
|
21
|
-
UI.user_error!("Your sentry-cli is outdated, please upgrade to at least version #{Fastlane::Sentry::CLI_VERSION} and start your lane again!")
|
12
|
+
if sentry_cli_version < bundled_sentry_cli_version
|
13
|
+
UI.user_error!("Your sentry-cli is outdated, please upgrade to at least version #{bundled_sentry_cli_version} and start your lane again!")
|
22
14
|
end
|
23
15
|
|
24
|
-
UI.success("sentry-cli #{sentry_cli_version}
|
25
|
-
|
16
|
+
UI.success("Using sentry-cli #{sentry_cli_version}")
|
17
|
+
sentry_cli_path
|
26
18
|
end
|
27
19
|
|
28
20
|
def self.call_sentry_cli(params, sub_command)
|
@@ -37,24 +29,31 @@ module Fastlane
|
|
37
29
|
UI.command(final_command)
|
38
30
|
end
|
39
31
|
|
40
|
-
Open3.
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
output
|
32
|
+
Open3.popen3(final_command) do |stdin, stdout, stderr, status_thread|
|
33
|
+
out_reader = Thread.new do
|
34
|
+
output = []
|
35
|
+
|
36
|
+
stdout.each_line do |line|
|
37
|
+
l = line.strip!
|
38
|
+
UI.message(l)
|
39
|
+
output << l
|
40
|
+
end
|
41
|
+
|
42
|
+
output.join
|
43
|
+
end
|
44
|
+
|
45
|
+
err_reader = Thread.new do
|
46
|
+
stderr.each_line do |line|
|
47
|
+
UI.message(line.strip!)
|
48
|
+
end
|
51
49
|
end
|
52
50
|
|
53
51
|
unless status_thread.value.success?
|
54
52
|
UI.user_error!('Error while calling Sentry CLI')
|
55
53
|
end
|
56
54
|
|
57
|
-
|
55
|
+
err_reader.join
|
56
|
+
out_reader.value
|
58
57
|
end
|
59
58
|
end
|
60
59
|
end
|
@@ -2,7 +2,7 @@ require 'fastlane/plugin/sentry/version'
|
|
2
2
|
|
3
3
|
module Fastlane
|
4
4
|
module Sentry
|
5
|
-
# Return all .rb files inside the "actions" and "helper"
|
5
|
+
# Return all .rb files inside the "actions" and "helper" directory
|
6
6
|
def self.all_classes
|
7
7
|
Dir[File.expand_path('**/{actions,helper}/*.rb', File.dirname(__FILE__))]
|
8
8
|
end
|
metadata
CHANGED
@@ -1,15 +1,35 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fastlane-plugin-sentry
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.13.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sentry
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-08-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: os
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.1'
|
20
|
+
- - ">="
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: 1.1.4
|
23
|
+
type: :runtime
|
24
|
+
prerelease: false
|
25
|
+
version_requirements: !ruby/object:Gem::Requirement
|
26
|
+
requirements:
|
27
|
+
- - "~>"
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '1.1'
|
30
|
+
- - ">="
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: 1.1.4
|
13
33
|
- !ruby/object:Gem::Dependency
|
14
34
|
name: bundler
|
15
35
|
requirement: !ruby/object:Gem::Requirement
|
@@ -82,12 +102,16 @@ dependencies:
|
|
82
102
|
version: '0'
|
83
103
|
description:
|
84
104
|
email: hello@sentry.io
|
85
|
-
executables:
|
105
|
+
executables:
|
106
|
+
- sentry_cli_path
|
86
107
|
extensions: []
|
87
108
|
extra_rdoc_files: []
|
88
109
|
files:
|
89
110
|
- LICENSE
|
90
111
|
- README.md
|
112
|
+
- bin/sentry-cli-Darwin-universal
|
113
|
+
- bin/sentry-cli-Windows-x86_64.exe
|
114
|
+
- bin/sentry_cli_path
|
91
115
|
- lib/fastlane/plugin/sentry.rb
|
92
116
|
- lib/fastlane/plugin/sentry/actions/sentry_check_cli_installed.rb
|
93
117
|
- lib/fastlane/plugin/sentry/actions/sentry_create_deploy.rb
|