fastlane-plugin-rollbar 0.1.2

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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: fcb92040f52701396cfdd208ee8324052f49fcffa3b5e8af3ec9429ad51ce3b1
4
+ data.tar.gz: 8c82701b67e76186b68bb4a3b77ddae831cb57ff6dcfca98580a85968ff16463
5
+ SHA512:
6
+ metadata.gz: 57b25f8e196ac1dbc8d0a35014d49c4bd1ad35841ffd6e8fba30525dfada87ce8a9fe7d6897ef4ab06b8666904329aba6bcd0c4fae9338ed75428c4cc1f6715f
7
+ data.tar.gz: 2ae6f612ea405e82894e4704dc03f1e8857f1d51e53ad23c85f3c018676f74c7006de893a6f06a8c5f0fe6083739f2215316d44756c494c53db3a33dbe8852fb
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2020 Evgrafov Denis <stereodenis@gmail.com>
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,76 @@
1
+ # rollbar plugin
2
+
3
+ [![fastlane Plugin Badge](https://rawcdn.githack.com/fastlane/fastlane/master/fastlane/assets/plugin-badge.svg)](https://rubygems.org/gems/fastlane-plugin-rollbar)
4
+
5
+ ## Getting Started
6
+
7
+ This project is a [_fastlane_](https://github.com/fastlane/fastlane) plugin. To get started with `fastlane-plugin-rollbar`, add it to your project by running:
8
+
9
+ ```bash
10
+ fastlane add_plugin rollbar
11
+ ```
12
+
13
+ ## About rollbar
14
+
15
+ Helps to upload sourcemaps/dsyms/proguard mapping/deploy report to Rollbar
16
+
17
+ ## Example
18
+
19
+ ```
20
+ rollbar_sourcemaps_upload(
21
+ api_key: 'YOUR_ROLLBAR_SERVER_API_KEY',
22
+ os: ['ios', 'android'],
23
+ code_version: 'your_code_version'
24
+ environment: 'production',
25
+ )
26
+
27
+ rollbar_dsym_upload(
28
+ api_key: 'YOUR_ROLLBAR_SERVER_API_KEY',
29
+ dsym_path: '/path/to/dsym.zip',
30
+ code_version: 'your_code_version',
31
+ bundle_identifier: 'YOUR_BUNDLE_IDENTIFIER',
32
+ environment: 'production',
33
+ )
34
+
35
+ rollbar_proguard_upload(
36
+ api_key: 'YOUR_ROLLBAR_SERVER_API_KEY',
37
+ proguard_path: /path/to/mapping.txt,
38
+ code_version: 'your_code_version',
39
+ environment: 'production',
40
+ )
41
+
42
+ rollbar_report_deploy(
43
+ api_key: 'YOUR_ROLLBAR_SERVER_API_KEY',
44
+ environment: 'production',
45
+ revision: 'GIT_SHA_REVISION',
46
+ )
47
+ ```
48
+
49
+ ## Run tests for this plugin
50
+
51
+ To run both the tests, and code style validation, run
52
+
53
+ ```
54
+ rake
55
+ ```
56
+
57
+ To automatically fix many of the styling issues, use
58
+ ```
59
+ rubocop -a
60
+ ```
61
+
62
+ ## Issues and Feedback
63
+
64
+ For any other issues and feedback about this plugin, please submit it to this repository.
65
+
66
+ ## Troubleshooting
67
+
68
+ If you have trouble using plugins, check out the [Plugins Troubleshooting](https://docs.fastlane.tools/plugins/plugins-troubleshooting/) guide.
69
+
70
+ ## Using _fastlane_ Plugins
71
+
72
+ For more information about how the `fastlane` plugin system works, check out the [Plugins documentation](https://docs.fastlane.tools/plugins/create-plugin/).
73
+
74
+ ## About _fastlane_
75
+
76
+ _fastlane_ is the easiest way to automate beta deployments and releases for your iOS and Android apps. To learn more, check out [fastlane.tools](https://fastlane.tools).
@@ -0,0 +1,55 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'fastlane/action'
4
+ require_relative '../helper/rollbar_sourcemaps_upload_helper'
5
+
6
+ module Fastlane
7
+ module Actions
8
+ class RollbarDsymUploadAction < Action
9
+ def self.run(params)
10
+ Helper::RollbarSourcemapsUploadHelper.upload_dsym(
11
+ params[:api_key],
12
+ params[:dsym_path],
13
+ params[:code_version],
14
+ params[:bundle_identifier],
15
+ params[:environment],
16
+ )
17
+ end
18
+
19
+ def self.description
20
+ 'Helps to upload Dsym to Rollbar'
21
+ end
22
+
23
+ def self.authors
24
+ ['Evgrafov Denis']
25
+ end
26
+
27
+ def self.return_value
28
+ # If your method provides a return value, you can describe here what it does
29
+ end
30
+
31
+ def self.details
32
+ # Optional:
33
+ 'Helps to upload Dsym to Rollbar'
34
+ end
35
+
36
+ def self.available_options
37
+ [
38
+ FastlaneCore::ConfigItem.new(key: :api_key, description: 'Rollbar API key', optional: false, type: String),
39
+ FastlaneCore::ConfigItem.new(key: :dsym_path, description: 'Dsym path', optional: false, type: String),
40
+ FastlaneCore::ConfigItem.new(key: :code_version, description: 'Code version', optional: false, type: String),
41
+ FastlaneCore::ConfigItem.new(key: :bundle_identifier, description: 'Bundle identifier', optional: false, type: String),
42
+ FastlaneCore::ConfigItem.new(key: :environment, description: 'Environment', optional: false, type: String),
43
+ ]
44
+ end
45
+
46
+ def self.is_supported?(platform)
47
+ # Adjust this if your plugin only works for a particular platform (iOS vs. Android, for example)
48
+ # See: https://docs.fastlane.tools/advanced/#control-configuration-by-lane-and-by-platform
49
+ #
50
+ %i[ios android].include?(platform)
51
+ true
52
+ end
53
+ end
54
+ end
55
+ end
@@ -0,0 +1,53 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'fastlane/action'
4
+ require_relative '../helper/rollbar_sourcemaps_upload_helper'
5
+
6
+ module Fastlane
7
+ module Actions
8
+ class RollbarProguardUploadAction < Action
9
+ def self.run(params)
10
+ Helper::RollbarSourcemapsUploadHelper.upload_proguard(
11
+ params[:api_key],
12
+ params[:proguard_path],
13
+ params[:code_version],
14
+ params[:environment],
15
+ )
16
+ end
17
+
18
+ def self.description
19
+ 'Helps to upload Proguard mappings to Rollbar'
20
+ end
21
+
22
+ def self.authors
23
+ ['Evgrafov Denis']
24
+ end
25
+
26
+ def self.return_value
27
+ # If your method provides a return value, you can describe here what it does
28
+ end
29
+
30
+ def self.details
31
+ # Optional:
32
+ 'Helps to upload Proguard mappings to Rollbar'
33
+ end
34
+
35
+ def self.available_options
36
+ [
37
+ FastlaneCore::ConfigItem.new(key: :api_key, description: 'Rollbar API key', optional: false, type: String),
38
+ FastlaneCore::ConfigItem.new(key: :proguard_path, description: 'Proguard mapping path', optional: false, type: String),
39
+ FastlaneCore::ConfigItem.new(key: :code_version, description: 'Code version', optional: false, type: String),
40
+ FastlaneCore::ConfigItem.new(key: :environment, description: 'Environment', optional: false, type: String),
41
+ ]
42
+ end
43
+
44
+ def self.is_supported?(platform)
45
+ # Adjust this if your plugin only works for a particular platform (iOS vs. Android, for example)
46
+ # See: https://docs.fastlane.tools/advanced/#control-configuration-by-lane-and-by-platform
47
+ #
48
+ %i[ios android].include?(platform)
49
+ true
50
+ end
51
+ end
52
+ end
53
+ end
@@ -0,0 +1,51 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'fastlane/action'
4
+ require_relative '../helper/rollbar_sourcemaps_upload_helper'
5
+
6
+ module Fastlane
7
+ module Actions
8
+ class RollbarReportDeployAction < Action
9
+ def self.run(params)
10
+ Helper::RollbarSourcemapsUploadHelper.report_deploy(
11
+ params[:api_key],
12
+ params[:environment],
13
+ params[:revision],
14
+ )
15
+ end
16
+
17
+ def self.description
18
+ 'Helps to report deploy to Rollbar'
19
+ end
20
+
21
+ def self.authors
22
+ ['Evgrafov Denis']
23
+ end
24
+
25
+ def self.return_value
26
+ # If your method provides a return value, you can describe here what it does
27
+ end
28
+
29
+ def self.details
30
+ 'Helps to report deploy to Rollbar'
31
+ end
32
+
33
+ def self.available_options
34
+ [
35
+ FastlaneCore::ConfigItem.new(key: :api_key, description: 'Rollbar API key', optional: false, type: String),
36
+ FastlaneCore::ConfigItem.new(key: :environment, description: 'Environment', optional: false, type: String),
37
+ FastlaneCore::ConfigItem.new(key: :revision, description: 'Git SHA of revision being deployed', optional: false, type: String),
38
+ # FastlaneCore::ConfigItem.new(key: :bundle_identifier, description: 'Bundle identifier', optional: false, type: String)
39
+ ]
40
+ end
41
+
42
+ def self.is_supported?(platform)
43
+ # Adjust this if your plugin only works for a particular platform (iOS vs. Android, for example)
44
+ # See: https://docs.fastlane.tools/advanced/#control-configuration-by-lane-and-by-platform
45
+ #
46
+ %i[ios android].include?(platform)
47
+ true
48
+ end
49
+ end
50
+ end
51
+ end
@@ -0,0 +1,56 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'fastlane/action'
4
+ require_relative '../helper/rollbar_sourcemaps_upload_helper'
5
+
6
+ module Fastlane
7
+ module Actions
8
+ class RollbarSourcemapsUploadAction < Action
9
+ def self.run(params)
10
+ Helper::RollbarSourcemapsUploadHelper.create_bundle(os)
11
+ Helper::RollbarSourcemapsUploadHelper.upload_bundle(
12
+ params[:api_key],
13
+ params[:os],
14
+ params[:code_version],
15
+ params[:environment],
16
+ )
17
+ end
18
+ end
19
+
20
+ def self.description
21
+ 'Helps to upload sourcemaps to Rollbar'
22
+ end
23
+
24
+ def self.authors
25
+ ['Evgrafov Denis']
26
+ end
27
+
28
+ def self.return_value
29
+ # If your method provides a return value, you can describe here what it does
30
+ end
31
+
32
+ def self.details
33
+ # Optional:
34
+ 'Helps to upload sourcemaps to Rollbar'
35
+ end
36
+
37
+ def self.available_options
38
+ [
39
+ FastlaneCore::ConfigItem.new(key: :api_key, description: 'Rollbar API key', optional: false, type: String),
40
+ FastlaneCore::ConfigItem.new(key: :os, description: 'ios or android', optional: false, type: String),
41
+ FastlaneCore::ConfigItem.new(key: :code_version, description: 'Code version', optional: false, type: String),
42
+ FastlaneCore::ConfigItem.new(key: :bundle_identifier, description: 'Bundle identifier', optional: true, type: String),
43
+ FastlaneCore::ConfigItem.new(key: :environment, description: 'Environment', optional: false, type: String),
44
+ ]
45
+ end
46
+
47
+ def self.is_supported?(platform)
48
+ # Adjust this if your plugin only works for a particular platform (iOS vs. Android, for example)
49
+ # See: https://docs.fastlane.tools/advanced/#control-configuration-by-lane-and-by-platform
50
+ #
51
+ %i[ios android].include?(platform)
52
+ true
53
+ end
54
+ end
55
+ end
56
+ end
@@ -0,0 +1,76 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'fastlane_core/ui/ui'
4
+
5
+ module Fastlane
6
+ UI = FastlaneCore::UI unless Fastlane.const_defined?('UI')
7
+ API_URL = 'https://api.rollbar.com/api/1'.freeze
8
+ API_SOURCEMAP_URL = "#{API_URL}/sourcemap".freeze
9
+ API_DSYM_URL = "#{API_URL}/dsym".freeze
10
+ API_PROGUARD_URL = "#{API_URL}/proguard".freeze
11
+ API_DEPLOY_URL = "#{API_URL}/deploy".freeze
12
+
13
+ module Helper
14
+ class RollbarSourcemapsUploadHelper
15
+ # class methods that you define here become available in your action
16
+ # as `Helper::RollbarSourcemapsUploadHelper.your_method`
17
+ #
18
+ def self.create_bundle(os)
19
+ UI.message('Creating React Native bundle')
20
+ jsbundle = os == 'ios' ? 'main.jsbundle' : 'index.android.bundle'
21
+ assets_dest = os == 'ios' ? 'ios' : 'android/app/src/main/res/'
22
+ Action.sh("react-native bundle \
23
+ --platform #{os} \
24
+ --dev false \
25
+ --entry-file index.js \
26
+ --bundle-output /tmp/#{jsbundle} \
27
+ --assets-dest #{assets_dest} \
28
+ --sourcemap-output ./tmp/sourcemap.#{os}.js \
29
+ --sourcemap-sources-root ./")
30
+ end
31
+
32
+ def self.upload_bundle(api_key, os, code_version, environment)
33
+ UI.message('Uploading React Native bundle to Rollbar')
34
+ jsbundle = os == 'ios' ? 'main.jsbundle' : 'index.android.bundle'
35
+ Action.sh("curl #{API_SOURCEMAP_URL} \
36
+ -F access_token=#{api_key} \
37
+ -F version=#{code_version}.#{os} \
38
+ -F minified_url=http://reactnativehost/#{jsbundle} \
39
+ -F environment=#{environment} \
40
+ -F source_map=@tmp/sourcemap.#{os}.js \
41
+ -F index.js=@index.js")
42
+ end
43
+
44
+ def self.upload_dsym(api_key, dsym_path, code_version, bundle_identifier, environment)
45
+ UI.message('Uploading Dsym to Rollbar')
46
+ Action.sh("curl -X POST #{API_DSYM_URL} \
47
+ -F access_token=#{api_key} \
48
+ -F version=#{code_version}.ios \
49
+ -F bundle_identifier=#{bundle_identifier} \
50
+ -F environment=#{environment} \
51
+ -F dsym=@#{dsym_path}")
52
+ end
53
+
54
+ def self.upload_proguard(api_key, proguard_path, code_version, environment)
55
+ UI.message('Uploading Proguard mapping to Rollbar')
56
+ Action.sh("curl #{API_PROGUARD_URL} \
57
+ -F access_token=#{api_key} \
58
+ -F version=#{code_version}.android \
59
+ -F environment=#{environment} \
60
+ -F mapping=@#{proguard_path}")
61
+ end
62
+
63
+ def self.report_deploy(api_key, environment, revision)
64
+ UI.message('Report deploy to Rollbar')
65
+ Action.sh("curl #{API_DEPLOY_URL} \
66
+ -F access_token=#{api_key} \
67
+ -F environment=#{environment} \
68
+ -F revision=#{revision}")
69
+ end
70
+
71
+ def self.show_message
72
+ UI.message('Hello from the rollbar plugin helper!')
73
+ end
74
+ end
75
+ end
76
+ end
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Fastlane
4
+ module Rollbar
5
+ VERSION = '0.1.2'.freeze
6
+ end
7
+ end
@@ -0,0 +1,18 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'fastlane/plugin/rollbar/version'
4
+
5
+ module Fastlane
6
+ module Rollbar
7
+ # Return all .rb files inside the "actions" and "helper" directory
8
+ def self.all_classes
9
+ Dir[File.expand_path('**/{actions,helper}/*.rb', File.dirname(__FILE__))]
10
+ end
11
+ end
12
+ end
13
+
14
+ # By default we want to import all available actions and helpers
15
+ # A plugin can contain any number of actions and plugins
16
+ Fastlane::RollbarSourcemapsUpload.all_classes.each do |current|
17
+ require current
18
+ end
metadata ADDED
@@ -0,0 +1,177 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: fastlane-plugin-rollbar
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.2
5
+ platform: ruby
6
+ authors:
7
+ - Evgrafov Denis
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2020-05-13 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: fastlane
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: 2.146.1
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: 2.146.1
41
+ - !ruby/object:Gem::Dependency
42
+ name: pry
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rake
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: rspec
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: rspec_junit_formatter
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
97
+ - !ruby/object:Gem::Dependency
98
+ name: rubocop
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - '='
102
+ - !ruby/object:Gem::Version
103
+ version: 0.49.1
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - '='
109
+ - !ruby/object:Gem::Version
110
+ version: 0.49.1
111
+ - !ruby/object:Gem::Dependency
112
+ name: rubocop-require_tools
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ">="
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - ">="
123
+ - !ruby/object:Gem::Version
124
+ version: '0'
125
+ - !ruby/object:Gem::Dependency
126
+ name: simplecov
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - ">="
130
+ - !ruby/object:Gem::Version
131
+ version: '0'
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - ">="
137
+ - !ruby/object:Gem::Version
138
+ version: '0'
139
+ description:
140
+ email: stereodenis@gmail.com
141
+ executables: []
142
+ extensions: []
143
+ extra_rdoc_files: []
144
+ files:
145
+ - LICENSE
146
+ - README.md
147
+ - lib/fastlane/plugin/rollbar/actions/rollbar_dsym_upload_action.rb
148
+ - lib/fastlane/plugin/rollbar/actions/rollbar_proguard_upload_action.rb
149
+ - lib/fastlane/plugin/rollbar/actions/rollbar_report_deploy_action.rb
150
+ - lib/fastlane/plugin/rollbar/actions/rollbar_sourcemaps_upload_action.rb
151
+ - lib/fastlane/plugin/rollbar/helper/rollbar_sourcemaps_upload_helper.rb
152
+ - lib/fastlane/plugin/rollbar/version.rb
153
+ - lib/fastlane/plugin/rollbar_sourcemaps_upload.rb
154
+ homepage: https://github.com/stereodenis/fastlane-plugin-rollbar
155
+ licenses:
156
+ - MIT
157
+ metadata: {}
158
+ post_install_message:
159
+ rdoc_options: []
160
+ require_paths:
161
+ - lib
162
+ required_ruby_version: !ruby/object:Gem::Requirement
163
+ requirements:
164
+ - - ">="
165
+ - !ruby/object:Gem::Version
166
+ version: '0'
167
+ required_rubygems_version: !ruby/object:Gem::Requirement
168
+ requirements:
169
+ - - ">="
170
+ - !ruby/object:Gem::Version
171
+ version: '0'
172
+ requirements: []
173
+ rubygems_version: 3.1.2
174
+ signing_key:
175
+ specification_version: 4
176
+ summary: Helps to upload sourcemaps/dsyms/proguard mapping/deploy report to Rollbar
177
+ test_files: []