fastlane-plugin-appmetrica 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 676f79de4bdb5715a4f2fe676494ef43373a62be1d4abc2c0be9957a27be8206
4
+ data.tar.gz: dc6b099d21cc3f74723a6a8701a3edbb93feb75a2a550bc2758d594910351000
5
+ SHA512:
6
+ metadata.gz: d8fc88e6f3b8baf70153b5cb80454ae56992efe43ad3f98df4e50d8b6f1011331df2c20387aba5e3685056fec06dfcf939fc02fc364f772c8e3a3b4365857f9e
7
+ data.tar.gz: 779e6dc9d7425594e93c2f90bc135d125e7f57142ae7be08629f4456b172075c0591d6f5ca6b5a6a6226a7e8dfd9c171b03bbac19e560fe758f1cadbec94fee9
data/LICENSE ADDED
@@ -0,0 +1,2 @@
1
+ EULA could be found at:
2
+ https://yandex.com/legal/appmetrica_sdk_agreement/
data/README.md ADDED
@@ -0,0 +1,49 @@
1
+ # AppMetrica plugin
2
+
3
+ [![fastlane Plugin Badge](https://rawcdn.githack.com/fastlane/fastlane/master/fastlane/assets/plugin-badge.svg)](https://rubygems.org/gems/fastlane-plugin-appmetrica)
4
+
5
+ ## Getting Started
6
+
7
+ This project is a [_fastlane_](https://github.com/fastlane/fastlane) plugin. To get started with `fastlane-plugin-appmetrica`, add it to your project by running:
8
+
9
+ ```bash
10
+ fastlane add_plugin appmetrica
11
+ ```
12
+
13
+ ## About AppMetrica Plugin
14
+
15
+ Upload dSYM symbolication files to AppMetrica.
16
+ Documentation could be found at [AppMetrica official site](https://appmetrica.yandex.ru/docs/crash/upload-dsym.html)
17
+
18
+ ## Example
19
+
20
+ Check out the [example `Fastfile`](fastlane/Fastfile) to see how to use this plugin. Try it by cloning the repo, running `fastlane install_plugins` and `bundle exec fastlane test`.
21
+
22
+ ## Run tests for this plugin
23
+
24
+ To run both the tests, and code style validation, run
25
+
26
+ ```
27
+ rake
28
+ ```
29
+
30
+ To automatically fix many of the styling issues, use
31
+ ```
32
+ rubocop -a
33
+ ```
34
+
35
+ ## Issues and Feedback
36
+
37
+ For any other issues and feedback about this plugin, please submit it to this repository.
38
+
39
+ ## Troubleshooting
40
+
41
+ If you have trouble using plugins, check out the [Plugins Troubleshooting](https://docs.fastlane.tools/plugins/plugins-troubleshooting/) guide.
42
+
43
+ ## Using _fastlane_ Plugins
44
+
45
+ For more information about how the `fastlane` plugin system works, check out the [Plugins documentation](https://docs.fastlane.tools/plugins/create-plugin/).
46
+
47
+ ## About _fastlane_
48
+
49
+ _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,16 @@
1
+ require 'fastlane/plugin/appmetrica/version'
2
+
3
+ module Fastlane
4
+ module Appmetrica
5
+ # Return all .rb files inside the "actions" and "helper" directory
6
+ def self.all_classes
7
+ Dir[File.expand_path('**/{actions,helper}/*.rb', File.dirname(__FILE__))]
8
+ end
9
+ end
10
+ end
11
+
12
+ # By default we want to import all available actions and helpers
13
+ # A plugin can contain any number of actions and plugins
14
+ Fastlane::Appmetrica.all_classes.each do |current|
15
+ require current
16
+ end
@@ -0,0 +1,109 @@
1
+ require 'fastlane/action'
2
+
3
+ module Fastlane
4
+ module Actions
5
+ class UploadSymbolsToAppmetricaAction < Action
6
+ def self.run(params)
7
+ find_binary(params)
8
+
9
+ Dir.mktmpdir do |temp_dir|
10
+ self.run_helper(temp_dir, params)
11
+ end
12
+ end
13
+
14
+ def self.run_helper(temp_dir, params)
15
+ unless params[:package_output_path].nil?
16
+ package_output_path = File.absolute_path(params[:package_output_path])
17
+ end
18
+
19
+ files = params[:files] || [Actions.lane_context[SharedValues::DSYM_OUTPUT_PATH]] || []
20
+ files = files.map do |file|
21
+ self.process_file(file, temp_dir) unless file.nil?
22
+ end
23
+
24
+ cmd = [params[:binary_path], "--post-api-key=#{params[:post_api_key]}"]
25
+ cmd << "--verbose" if params[:verbose]
26
+ cmd << "--package-output-path=#{package_output_path.shellescape}" unless package_output_path.nil?
27
+ cmd += files unless files.nil?
28
+
29
+ UI.message("Starting helper")
30
+ Actions.sh(cmd)
31
+ end
32
+
33
+ def self.process_file(file_path, temp_dir)
34
+ if File.extname(file_path) == ".zip"
35
+ Actions.sh("unzip -o #{file_path.shellescape} -d #{temp_dir.shellescape} 2>/dev/null")
36
+ return temp_dir
37
+ end
38
+ return File.absolute_path(file_path)
39
+ end
40
+
41
+ def self.find_binary(params)
42
+ params[:binary_path] ||= Dir["./Pods/**/helper"].last
43
+
44
+ unless params[:binary_path]
45
+ UI.user_error!("Failed to find 'helper' binary. Install YandexMobileMetrica 3.8.0 pod or higher. "\
46
+ "You may specify the location of the binary by using the binary_path option")
47
+ end
48
+
49
+ params[:binary_path] = File.expand_path(params[:binary_path])
50
+
51
+ cli_version = Gem::Version.new(`#{params[:binary_path]} --version`.strip)
52
+ unless Gem::Requirement.new(Fastlane::Appmetrica::CLI_VERSION) =~ cli_version
53
+ UI.user_error!("Your 'helper' is outdatedcd, please upgrade to at least version "\
54
+ "#{Fastlane::Appmetrica::CLI_VERSION} and start again!")
55
+ end
56
+ end
57
+
58
+ #####################################################
59
+ # @!group Documentation
60
+ #####################################################
61
+
62
+ def self.description
63
+ "Upload dSYM symbolication files to AppMetrica"
64
+ end
65
+
66
+ def self.authors
67
+ ["Yandex, LLC"]
68
+ end
69
+
70
+ def self.details
71
+ "This plugin allows uploading dSYM symbolication files to AppMetrica. It should be applied if you use Bitcode"
72
+ end
73
+
74
+ def self.available_options
75
+ [
76
+ FastlaneCore::ConfigItem.new(key: :binary_path,
77
+ description: "The path to 'helper' binary in AppMetrica framework",
78
+ optional: true,
79
+ type: String),
80
+ FastlaneCore::ConfigItem.new(key: :post_api_key,
81
+ env_name: "APPMETRICA_POST_API_KEY",
82
+ description: "Post API key. This mandatory parameter is "\
83
+ "used to upload dSYMs to AppMetrica",
84
+ optional: false,
85
+ type: String),
86
+ FastlaneCore::ConfigItem.new(key: :package_output_path,
87
+ description: "The path where temporary archives are stored. "\
88
+ "If not specified, default system's temporary directory used instead",
89
+ optional: true,
90
+ type: String),
91
+ FastlaneCore::ConfigItem.new(key: :verbose,
92
+ description: "Verbose mode. Displays additional information",
93
+ optional: true,
94
+ type: String),
95
+ FastlaneCore::ConfigItem.new(key: :files,
96
+ description: "An optional list of dSYM files or directories that "\
97
+ "contain these files to upload. If not specified, "\
98
+ "the local working directory used by default",
99
+ optional: true,
100
+ type: Array)
101
+ ]
102
+ end
103
+
104
+ def self.is_supported?(platform)
105
+ [:ios, :mac].include?(platform)
106
+ end
107
+ end
108
+ end
109
+ end
@@ -0,0 +1,6 @@
1
+ module Fastlane
2
+ module Appmetrica
3
+ VERSION = "0.1.0"
4
+ CLI_VERSION = "~> 0.0"
5
+ end
6
+ end
metadata ADDED
@@ -0,0 +1,174 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: fastlane-plugin-appmetrica
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Yandex, LLC
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2019-09-25 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: pry
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: bundler
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rspec
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: rspec_junit_formatter
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: rake
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: rubocop
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - '='
88
+ - !ruby/object:Gem::Version
89
+ version: 0.49.1
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - '='
95
+ - !ruby/object:Gem::Version
96
+ version: 0.49.1
97
+ - !ruby/object:Gem::Dependency
98
+ name: rubocop-require_tools
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
111
+ - !ruby/object:Gem::Dependency
112
+ name: simplecov
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: fastlane
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - ">="
130
+ - !ruby/object:Gem::Version
131
+ version: 2.131.0
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - ">="
137
+ - !ruby/object:Gem::Version
138
+ version: 2.131.0
139
+ description:
140
+ email: appmetrica@yandex-team.ru
141
+ executables: []
142
+ extensions: []
143
+ extra_rdoc_files: []
144
+ files:
145
+ - LICENSE
146
+ - README.md
147
+ - lib/fastlane/plugin/appmetrica.rb
148
+ - lib/fastlane/plugin/appmetrica/actions/upload_symbols_to_appmetrica.rb
149
+ - lib/fastlane/plugin/appmetrica/version.rb
150
+ homepage: https://github.com/yandexmobile/metrica-plugin-fastlane
151
+ licenses:
152
+ - Nonstandard
153
+ metadata: {}
154
+ post_install_message:
155
+ rdoc_options: []
156
+ require_paths:
157
+ - lib
158
+ required_ruby_version: !ruby/object:Gem::Requirement
159
+ requirements:
160
+ - - ">="
161
+ - !ruby/object:Gem::Version
162
+ version: '0'
163
+ required_rubygems_version: !ruby/object:Gem::Requirement
164
+ requirements:
165
+ - - ">="
166
+ - !ruby/object:Gem::Version
167
+ version: '0'
168
+ requirements: []
169
+ rubyforge_project:
170
+ rubygems_version: 2.7.8
171
+ signing_key:
172
+ specification_version: 4
173
+ summary: Upload dSYM symbolication files to AppMetrica
174
+ test_files: []