fastlane-plugin-buggly 0.1.7
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 +71 -0
- data/lib/fastlane/plugin/buggly.rb +16 -0
- data/lib/fastlane/plugin/buggly/actions/buggly_action.rb +99 -0
- data/lib/fastlane/plugin/buggly/helper/buggly_helper.rb +16 -0
- data/lib/fastlane/plugin/buggly/version.rb +5 -0
- metadata +175 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 6cb05362f60c0a0bf2a5cb06c27cd5a7e85f87e5
|
4
|
+
data.tar.gz: 5dfacd90a0964e819b4535c995726d6e48fe31be
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: '019aa0723b6dd6a5426a89ec7156f6fae53fa095dd4a1e05a73e8631bb37a6985dd7c02d0f6eaefc211b2bb836cf29e45c3e43816adfc0f54f02e6319c5e5954'
|
7
|
+
data.tar.gz: 87cb853239b8be6134fbb0cff61a6bf344fbe4d96a5935fadb8163ed1896fc253cb7ba7bfa2d84088fd0357171bb725f2aa6690c30614a635579f84dc0568ca5
|
data/LICENSE
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2019 zhuyunlong <zhuyunlong@jiayuan.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,71 @@
|
|
1
|
+
# buggly plugin
|
2
|
+
|
3
|
+
[](https://rubygems.org/gems/fastlane-plugin-buggly)
|
4
|
+
|
5
|
+
## Getting Started
|
6
|
+
|
7
|
+
This project is a [_fastlane_](https://github.com/fastlane/fastlane) plugin. To get started with `fastlane-plugin-buggly`, add it to your project by running:
|
8
|
+
|
9
|
+
```bash
|
10
|
+
fastlane add_plugin buggly
|
11
|
+
```
|
12
|
+
|
13
|
+
## About buggly
|
14
|
+
|
15
|
+
上传Bugly
|
16
|
+
|
17
|
+
**Note to author:** Add a more detailed description about this plugin here. If your plugin contains multiple actions, make sure to mention them here.
|
18
|
+
|
19
|
+
Basic usage
|
20
|
+
Just add the action upload_to_buggly to your lanes.
|
21
|
+
|
22
|
+
sample code:
|
23
|
+
|
24
|
+
lane :beta do
|
25
|
+
increment_build_number
|
26
|
+
gym
|
27
|
+
buggly(appId:your_buggly_app_id,
|
28
|
+
appKey:your_buggly_app_key)
|
29
|
+
end
|
30
|
+
You can found your buggly app id and app key when you register your app in buggly. For more infomation about buggly see: https://bugly.qq.com
|
31
|
+
|
32
|
+
You can also set the buggly app id and app key in the Appfile.
|
33
|
+
|
34
|
+
Appfile:
|
35
|
+
|
36
|
+
app_identifier "xxx.xxx.xxxx" # The bundle identifier of your app
|
37
|
+
apple_id "xxxx@xxxx.com" # Your Apple email address
|
38
|
+
|
39
|
+
buggly_app_id "your_buggly_app_id"
|
40
|
+
buggly_app_key "your_buggly_app_key"
|
41
|
+
More Reference can be shown by following command.
|
42
|
+
|
43
|
+
fastlane action upload_to_buggly
|
44
|
+
## Run tests for this plugin
|
45
|
+
|
46
|
+
To run both the tests, and code style validation, run
|
47
|
+
|
48
|
+
```
|
49
|
+
rake
|
50
|
+
```
|
51
|
+
|
52
|
+
To automatically fix many of the styling issues, use
|
53
|
+
```
|
54
|
+
rubocop -a
|
55
|
+
```
|
56
|
+
|
57
|
+
## Issues and Feedback
|
58
|
+
|
59
|
+
For any other issues and feedback about this plugin, please submit it to this repository.
|
60
|
+
|
61
|
+
## Troubleshooting
|
62
|
+
|
63
|
+
If you have trouble using plugins, check out the [Plugins Troubleshooting](https://docs.fastlane.tools/plugins/plugins-troubleshooting/) guide.
|
64
|
+
|
65
|
+
## Using _fastlane_ Plugins
|
66
|
+
|
67
|
+
For more information about how the `fastlane` plugin system works, check out the [Plugins documentation](https://docs.fastlane.tools/plugins/create-plugin/).
|
68
|
+
|
69
|
+
## About _fastlane_
|
70
|
+
|
71
|
+
_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/buggly/version'
|
2
|
+
|
3
|
+
module Fastlane
|
4
|
+
module Buggly
|
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::Buggly.all_classes.each do |current|
|
15
|
+
require current
|
16
|
+
end
|
@@ -0,0 +1,99 @@
|
|
1
|
+
require 'pathname'
|
2
|
+
require 'fileutils'
|
3
|
+
module Fastlane
|
4
|
+
module Actions
|
5
|
+
module SharedValues
|
6
|
+
end
|
7
|
+
|
8
|
+
class BugglyAction < Action
|
9
|
+
def self.run(params)
|
10
|
+
unless Helper.test?
|
11
|
+
UI.user_error!("curl not installed") if `which curl`.length == 0
|
12
|
+
end
|
13
|
+
|
14
|
+
filename = params[:dymZipFile].split("/").last
|
15
|
+
dsymUzip = "#{Pathname.new(params[:dymZipFile]).dirname}/#{filename.gsub!(".app.dSYM.zip", "")}"
|
16
|
+
command = "unzip -o #{params[:dymZipFile]} -d '#{dsymUzip}'"
|
17
|
+
Fastlane::Actions.sh(command, log: false)
|
18
|
+
dsymFileName = sh "ls #{dsymUzip} | grep -e 'app.dSYM'"
|
19
|
+
command = "java -jar ~/bin/buglySymboliOS.jar -u -id #{params[:appId]} -key #{params[:appKey]} -package #{params[:bundleId]} -version '#{params[:appVersion]}' -i #{dsymUzip}/#{dsymFileName}"
|
20
|
+
result = Fastlane::Actions.sh(command, log: true)
|
21
|
+
FileUtils.rm_r "#{dsymUzip}" if dsymUzip.length>0
|
22
|
+
UI.success "Success to upload the dSYM for the app [#{params[:bundleId]}#{params[:appVersion]}]"
|
23
|
+
|
24
|
+
end
|
25
|
+
|
26
|
+
#####################################################
|
27
|
+
# @!group Documentation
|
28
|
+
#####################################################
|
29
|
+
|
30
|
+
def self.description
|
31
|
+
"Upload the dSYM file to Buggly crash analyze system."
|
32
|
+
end
|
33
|
+
|
34
|
+
def self.details
|
35
|
+
# Optional:
|
36
|
+
# this is your chance to provide a more detailed description of this action
|
37
|
+
"More information can be found on https://github.com/zylcold/fastlane-plugin-buggly.git"
|
38
|
+
end
|
39
|
+
|
40
|
+
def self.available_options
|
41
|
+
|
42
|
+
[
|
43
|
+
FastlaneCore::ConfigItem.new(key: :appId,
|
44
|
+
env_name: "BUGGLY_APP_ID", # The name of the environment variable
|
45
|
+
description: "APP ID for Buggly", # a short description of this parameter
|
46
|
+
verify_block: proc do |value|
|
47
|
+
UI.user_error!("No APP ID for Buggly given, pass using `appId: 'appId'`, you can find it in your buggly app settings.") unless (value and not value.empty?)
|
48
|
+
end),
|
49
|
+
FastlaneCore::ConfigItem.new(key: :appKey,
|
50
|
+
env_name: "BUGGLY_APP_KEY", # The name of the environment variable
|
51
|
+
description: "APP Key for Buggly", # a short description of this parameter
|
52
|
+
verify_block: proc do |value|
|
53
|
+
UI.user_error!("No APP Key for Buggly given, pass using `appKey: 'appKey'`, you can find it in your buggly app settings.") unless (value and not value.empty?)
|
54
|
+
end),
|
55
|
+
FastlaneCore::ConfigItem.new(key: :bundleId,
|
56
|
+
env_name: "BUGGLY_APP_BUNDLE_ID", # The name of the environment variable
|
57
|
+
description: "The app's bundle indentifier", # a short description of this parameter
|
58
|
+
verify_block: proc do |value|
|
59
|
+
UI.user_error!("No APP bundle id for the app given, pass using `bundleId: 'bundleId'`, the same as app_identifier in APPConfigFile") unless (value and not value.empty?)
|
60
|
+
end),
|
61
|
+
FastlaneCore::ConfigItem.new(key: :appVersion,
|
62
|
+
env_name: "BUGGLY_APP_VERSION", # The name of the environment variable
|
63
|
+
description: "APP Version to indentify dSYM file", # a short description of this parameter
|
64
|
+
default_value: "#{Actions.lane_context[SharedValues::VERSION_NUMBER]}(#{Actions.lane_context[SharedValues::BUILD_NUMBER]})"
|
65
|
+
),
|
66
|
+
FastlaneCore::ConfigItem.new(key: :dymZipFile,
|
67
|
+
env_name: "BUGGLY_BSYMBOL_ZIP_FILE", # The name of the environment variable
|
68
|
+
description: "The dSYM zip file path", # a short description of this parameter
|
69
|
+
default_value: Actions.lane_context[SharedValues::DSYM_OUTPUT_PATH],
|
70
|
+
verify_block: proc do |value|
|
71
|
+
UI.user_error!("DSYM zip file path, pass using `dymZipFile: 'dymZipFile'`") unless (value and not value.empty?)
|
72
|
+
UI.user_error!("dsym file not found") if !Helper.test? && !File.exist?(value)
|
73
|
+
UI.user_error!("dsym file must be a valid zip file") unless File.size(value) > 1
|
74
|
+
end)
|
75
|
+
]
|
76
|
+
end
|
77
|
+
|
78
|
+
def self.output
|
79
|
+
# Define the shared values you are going to provide
|
80
|
+
# Example
|
81
|
+
end
|
82
|
+
|
83
|
+
def self.return_value
|
84
|
+
# If you method provides a return value, you can describe here what it does
|
85
|
+
end
|
86
|
+
|
87
|
+
def self.authors
|
88
|
+
# So no one will ever forget your contribution to fastlane :) You are awesome btw!
|
89
|
+
["zhuyunlong0315@gmail.com"]
|
90
|
+
end
|
91
|
+
|
92
|
+
def self.is_supported?(platform)
|
93
|
+
|
94
|
+
platform == :ios
|
95
|
+
end
|
96
|
+
end
|
97
|
+
end
|
98
|
+
end
|
99
|
+
|
@@ -0,0 +1,16 @@
|
|
1
|
+
require 'fastlane_core/ui/ui'
|
2
|
+
|
3
|
+
module Fastlane
|
4
|
+
UI = FastlaneCore::UI unless Fastlane.const_defined?("UI")
|
5
|
+
|
6
|
+
module Helper
|
7
|
+
class BugglyHelper
|
8
|
+
# class methods that you define here become available in your action
|
9
|
+
# as `Helper::BugglyHelper.your_method`
|
10
|
+
#
|
11
|
+
def self.show_message
|
12
|
+
UI.message("Hello from the buggly plugin helper!")
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
metadata
ADDED
@@ -0,0 +1,175 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: fastlane-plugin-buggly
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.7
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- zhuyunlong
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2019-04-20 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.119.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.119.0
|
139
|
+
description:
|
140
|
+
email: zhuyunlong@jiayuan.com
|
141
|
+
executables: []
|
142
|
+
extensions: []
|
143
|
+
extra_rdoc_files: []
|
144
|
+
files:
|
145
|
+
- LICENSE
|
146
|
+
- README.md
|
147
|
+
- lib/fastlane/plugin/buggly.rb
|
148
|
+
- lib/fastlane/plugin/buggly/actions/buggly_action.rb
|
149
|
+
- lib/fastlane/plugin/buggly/helper/buggly_helper.rb
|
150
|
+
- lib/fastlane/plugin/buggly/version.rb
|
151
|
+
homepage: https://github.com/zylcold/fastlane-plugin-buggly
|
152
|
+
licenses:
|
153
|
+
- MIT
|
154
|
+
metadata: {}
|
155
|
+
post_install_message:
|
156
|
+
rdoc_options: []
|
157
|
+
require_paths:
|
158
|
+
- lib
|
159
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
160
|
+
requirements:
|
161
|
+
- - ">="
|
162
|
+
- !ruby/object:Gem::Version
|
163
|
+
version: '0'
|
164
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
165
|
+
requirements:
|
166
|
+
- - ">="
|
167
|
+
- !ruby/object:Gem::Version
|
168
|
+
version: '0'
|
169
|
+
requirements: []
|
170
|
+
rubyforge_project:
|
171
|
+
rubygems_version: 2.6.11
|
172
|
+
signing_key:
|
173
|
+
specification_version: 4
|
174
|
+
summary: 上传Bugly
|
175
|
+
test_files: []
|