fastlane-plugin-sentry 1.5.0 → 1.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +27 -0
- data/lib/fastlane/plugin/sentry/actions/sentry_set_commits.rb +79 -0
- data/lib/fastlane/plugin/sentry/actions/sentry_upload_proguard.rb +75 -0
- data/lib/fastlane/plugin/sentry/actions/sentry_upload_sourcemap.rb +20 -0
- data/lib/fastlane/plugin/sentry/helper/sentry_helper.rb +3 -3
- data/lib/fastlane/plugin/sentry/version.rb +2 -2
- metadata +5 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 943f62c00416b3aade1f829755a018fe6930e29f
|
4
|
+
data.tar.gz: 9a03647bcb4d7bbd4eeaff13d3ba2b8839ad2175
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '09d8f06e8519e4d8e4d27206e12f50f2d159d9e61362c97e6005e35600851d66247fc07a542f9afa046f7c1f777a075c88d6f666936e6d64b63844e17a9bd4c2'
|
7
|
+
data.tar.gz: b6de262c2d24c005d922fde175d5586402e33b8cccc3a054b6eaf6fa2501c2999e6e49fbbb84802e37d03a24c227066f28727c6616e70ce410d0e42b51e4d631
|
data/README.md
CHANGED
@@ -91,6 +91,33 @@ sentry_upload_sourcemap(
|
|
91
91
|
)
|
92
92
|
```
|
93
93
|
|
94
|
+
#### Uploading Proguard Mapping File
|
95
|
+
|
96
|
+
```ruby
|
97
|
+
sentry_upload_proguard(
|
98
|
+
api_key: '...', # Do not use if using auth_token
|
99
|
+
auth_token: '...', # Do not use if using api_key
|
100
|
+
org_slug: '...',
|
101
|
+
project_slug: '...',
|
102
|
+
android_manifest_path: 'path to merged AndroidManifest file' # found in `app/build/intermediates/manifests/full`
|
103
|
+
mapping_path: 'path to mapping.txt to upload',
|
104
|
+
)
|
105
|
+
```
|
106
|
+
|
107
|
+
#### Associating commits
|
108
|
+
|
109
|
+
Useful for telling Sentry which commits are associated with a release.
|
110
|
+
|
111
|
+
```ruby
|
112
|
+
sentry_set_commits(
|
113
|
+
version: '...',
|
114
|
+
app_identifier: '...', # pass in the bundle_identifer of your app
|
115
|
+
auto: false, # enable completely automated commit management
|
116
|
+
clear: false, # clear all current commits from the release
|
117
|
+
commit: '...', # commit spec, see `sentry-cli releases help set-commits` for more information
|
118
|
+
)
|
119
|
+
```
|
120
|
+
|
94
121
|
## Issues and Feedback
|
95
122
|
|
96
123
|
For any other issues and feedback about this plugin, please submit it to this repository.
|
@@ -0,0 +1,79 @@
|
|
1
|
+
module Fastlane
|
2
|
+
module Actions
|
3
|
+
class SentrySetCommitsAction < Action
|
4
|
+
def self.run(params)
|
5
|
+
require 'shellwords'
|
6
|
+
|
7
|
+
Helper::SentryHelper.check_sentry_cli!
|
8
|
+
Helper::SentryConfig.parse_api_params(params)
|
9
|
+
|
10
|
+
version = params[:version]
|
11
|
+
version = "#{params[:app_identifier]}-#{params[:version]}" if params[:app_identifier]
|
12
|
+
|
13
|
+
command = [
|
14
|
+
"sentry-cli",
|
15
|
+
"releases",
|
16
|
+
"set-commits",
|
17
|
+
version
|
18
|
+
]
|
19
|
+
|
20
|
+
command.push('--auto') if params[:auto]
|
21
|
+
command.push('--clear') if params[:clear]
|
22
|
+
command.push('--commit').push(params[:commit]) unless params[:commit].nil?
|
23
|
+
|
24
|
+
Helper::SentryHelper.call_sentry_cli(command)
|
25
|
+
UI.success("Successfully set commits for release: #{version}")
|
26
|
+
end
|
27
|
+
|
28
|
+
#####################################################
|
29
|
+
# @!group Documentation
|
30
|
+
#####################################################
|
31
|
+
|
32
|
+
def self.description
|
33
|
+
"Set commits of a release"
|
34
|
+
end
|
35
|
+
|
36
|
+
def self.details
|
37
|
+
[
|
38
|
+
"This action allows you to set commits in a release for a project on Sentry.",
|
39
|
+
"See https://docs.sentry.io/cli/releases/#sentry-cli-commit-integration for more information."
|
40
|
+
].join(" ")
|
41
|
+
end
|
42
|
+
|
43
|
+
def self.available_options
|
44
|
+
Helper::SentryConfig.common_api_config_items + [
|
45
|
+
FastlaneCore::ConfigItem.new(key: :version,
|
46
|
+
description: "Release version on Sentry"),
|
47
|
+
FastlaneCore::ConfigItem.new(key: :app_identifier,
|
48
|
+
short_option: "-a",
|
49
|
+
env_name: "SENTRY_APP_IDENTIFIER",
|
50
|
+
description: "App Bundle Identifier, prepended to version",
|
51
|
+
optional: true),
|
52
|
+
FastlaneCore::ConfigItem.new(key: :auto,
|
53
|
+
description: "Enable completely automated commit management",
|
54
|
+
is_string: false,
|
55
|
+
default_value: false),
|
56
|
+
FastlaneCore::ConfigItem.new(key: :clear,
|
57
|
+
description: "Clear all current commits from the release",
|
58
|
+
is_string: false,
|
59
|
+
default_value: false),
|
60
|
+
FastlaneCore::ConfigItem.new(key: :commit,
|
61
|
+
description: "Commit spec, see `sentry-cli releases help set-commits` for more information",
|
62
|
+
optional: true)
|
63
|
+
]
|
64
|
+
end
|
65
|
+
|
66
|
+
def self.return_value
|
67
|
+
nil
|
68
|
+
end
|
69
|
+
|
70
|
+
def self.authors
|
71
|
+
["brownoxford"]
|
72
|
+
end
|
73
|
+
|
74
|
+
def self.is_supported?(platform)
|
75
|
+
true
|
76
|
+
end
|
77
|
+
end
|
78
|
+
end
|
79
|
+
end
|
@@ -0,0 +1,75 @@
|
|
1
|
+
module Fastlane
|
2
|
+
module Actions
|
3
|
+
class SentryUploadProguardAction < Action
|
4
|
+
def self.run(params)
|
5
|
+
Helper::SentryHelper.check_sentry_cli!
|
6
|
+
Helper::SentryConfig.parse_api_params(params)
|
7
|
+
|
8
|
+
# Params - mapping & manifest
|
9
|
+
mapping_path = params[:mapping_path]
|
10
|
+
android_manifest_path = params[:android_manifest_path]
|
11
|
+
|
12
|
+
# Verify files
|
13
|
+
UI.user_error!("Mapping file does not exist at path: #{mapping_path}") unless File.exist? mapping_path
|
14
|
+
UI.user_error!("AndroidManifest.xml file does not exist at path: #{android_manifest_path}") unless File.exist? android_manifest_path
|
15
|
+
|
16
|
+
command = [
|
17
|
+
"sentry-cli",
|
18
|
+
"upload-proguard",
|
19
|
+
"--android-manifest",
|
20
|
+
android_manifest_path,
|
21
|
+
mapping_path
|
22
|
+
]
|
23
|
+
|
24
|
+
Helper::SentryHelper.call_sentry_cli(command)
|
25
|
+
UI.success("Successfully uploaded mapping file!")
|
26
|
+
end
|
27
|
+
|
28
|
+
#####################################################
|
29
|
+
# @!group Documentation
|
30
|
+
#####################################################
|
31
|
+
|
32
|
+
def self.description
|
33
|
+
"Upload mapping to a project on Sentry"
|
34
|
+
end
|
35
|
+
|
36
|
+
def self.details
|
37
|
+
[
|
38
|
+
"This action allows you to upload the proguard mapping file to Sentry.",
|
39
|
+
"See https://docs.sentry.io/cli/dif/proguard for more information."
|
40
|
+
].join(" ")
|
41
|
+
end
|
42
|
+
|
43
|
+
def self.available_options
|
44
|
+
Helper::SentryConfig.common_api_config_items + [
|
45
|
+
FastlaneCore::ConfigItem.new(key: :mapping_path,
|
46
|
+
env_name: "ANDROID_MAPPING_PATH",
|
47
|
+
description: "Path to your proguard mapping.txt file",
|
48
|
+
optional: false,
|
49
|
+
verify_block: proc do |value|
|
50
|
+
UI.user_error! "Could not find your mapping file at path '#{value}'" unless File.exist?(value)
|
51
|
+
end),
|
52
|
+
FastlaneCore::ConfigItem.new(key: :android_manifest_path,
|
53
|
+
env_name: "ANDROID_MANIFEST_PATH",
|
54
|
+
description: "Path to your merged AndroidManifest file. This is usually found under `app/build/intermediates/manifests/full`",
|
55
|
+
optional: false,
|
56
|
+
verify_block: proc do |value|
|
57
|
+
UI.user_error! "Could not find your merged AndroidManifest file at path '#{value}'" unless File.exist?(value)
|
58
|
+
end)
|
59
|
+
]
|
60
|
+
end
|
61
|
+
|
62
|
+
def self.return_value
|
63
|
+
nil
|
64
|
+
end
|
65
|
+
|
66
|
+
def self.authors
|
67
|
+
["mpp-anasa"]
|
68
|
+
end
|
69
|
+
|
70
|
+
def self.is_supported?(platform)
|
71
|
+
platform == :android
|
72
|
+
end
|
73
|
+
end
|
74
|
+
end
|
75
|
+
end
|
@@ -22,11 +22,24 @@ module Fastlane
|
|
22
22
|
]
|
23
23
|
|
24
24
|
command.push('--rewrite') if params[:rewrite]
|
25
|
+
command.push('--no-rewrite') unless params[:rewrite]
|
25
26
|
command.push('--strip-prefix') if params[:strip_prefix]
|
26
27
|
command.push('--strip-common-prefix') if params[:strip_common_prefix]
|
27
28
|
command.push('--url-prefix').push(params[:url_prefix]) unless params[:url_prefix].nil?
|
28
29
|
command.push('--dist').push(params[:dist]) unless params[:dist].nil?
|
29
30
|
|
31
|
+
unless params[:ignore].nil?
|
32
|
+
# normalize to array
|
33
|
+
unless params[:ignore].kind_of?(Enumerable)
|
34
|
+
params[:ignore] = [params[:ignore]]
|
35
|
+
end
|
36
|
+
# no nil or empty strings
|
37
|
+
params[:ignore].reject! { |e| e.strip.empty? rescue true }
|
38
|
+
command.push('--ignore').push(*params[:ignore]) if params[:ignore].any?
|
39
|
+
end
|
40
|
+
|
41
|
+
command.push('--ignore-file').push(params[:ignore_file]) unless params[:ignore_file].nil?
|
42
|
+
|
30
43
|
Helper::SentryHelper.call_sentry_cli(command)
|
31
44
|
UI.success("Successfully uploaded files to release: #{version}")
|
32
45
|
end
|
@@ -82,6 +95,13 @@ module Fastlane
|
|
82
95
|
short_option: "-a",
|
83
96
|
env_name: "SENTRY_APP_IDENTIFIER",
|
84
97
|
description: "App Bundle Identifier, prepended to version",
|
98
|
+
optional: true),
|
99
|
+
FastlaneCore::ConfigItem.new(key: :ignore,
|
100
|
+
description: "Ignores all files and folders matching the given glob or array of globs",
|
101
|
+
is_string: false,
|
102
|
+
optional: true),
|
103
|
+
FastlaneCore::ConfigItem.new(key: :ignore_file,
|
104
|
+
description: "Ignore all files and folders specified in the given ignore file, e.g. .gitignore",
|
85
105
|
optional: true)
|
86
106
|
|
87
107
|
]
|
@@ -33,12 +33,12 @@ module Fastlane
|
|
33
33
|
end
|
34
34
|
final_command = command.map { |arg| Shellwords.escape(arg) }.join(" ")
|
35
35
|
Open3.popen3(final_command) do |stdin, stdout, stderr, wait_thr|
|
36
|
-
while (line = stderr.gets)
|
37
|
-
error << line.strip!
|
38
|
-
end
|
39
36
|
while (line = stdout.gets)
|
40
37
|
UI.message(line.strip!)
|
41
38
|
end
|
39
|
+
while (line = stderr.gets)
|
40
|
+
error << line.strip!
|
41
|
+
end
|
42
42
|
exit_status = wait_thr.value
|
43
43
|
unless exit_status.success? && error.empty?
|
44
44
|
handle_error(error)
|
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: 1.
|
4
|
+
version: 1.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sentry
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-10-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pry
|
@@ -91,8 +91,10 @@ files:
|
|
91
91
|
- lib/fastlane/plugin/sentry.rb
|
92
92
|
- lib/fastlane/plugin/sentry/actions/sentry_create_release.rb
|
93
93
|
- lib/fastlane/plugin/sentry/actions/sentry_finalize_release.rb
|
94
|
+
- lib/fastlane/plugin/sentry/actions/sentry_set_commits.rb
|
94
95
|
- lib/fastlane/plugin/sentry/actions/sentry_upload_dsym.rb
|
95
96
|
- lib/fastlane/plugin/sentry/actions/sentry_upload_file.rb
|
97
|
+
- lib/fastlane/plugin/sentry/actions/sentry_upload_proguard.rb
|
96
98
|
- lib/fastlane/plugin/sentry/actions/sentry_upload_sourcemap.rb
|
97
99
|
- lib/fastlane/plugin/sentry/helper/sentry_config.rb
|
98
100
|
- lib/fastlane/plugin/sentry/helper/sentry_helper.rb
|
@@ -117,7 +119,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
117
119
|
version: '0'
|
118
120
|
requirements: []
|
119
121
|
rubyforge_project:
|
120
|
-
rubygems_version: 2.5.2
|
122
|
+
rubygems_version: 2.5.2.3
|
121
123
|
signing_key:
|
122
124
|
specification_version: 4
|
123
125
|
summary: Upload symbols to Sentry
|