fastlane-plugin-upload_dsym_to_bugly 0.2.0 → 2.0.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 +26 -25
- data/lib/fastlane/plugin/upload_dsym_to_bugly/actions/upload_dsym_to_bugly_action.rb +102 -63
- data/lib/fastlane/plugin/upload_dsym_to_bugly/jars/buglyqq-upload-symbol-3.3.4.jar +0 -0
- data/lib/fastlane/plugin/upload_dsym_to_bugly/version.rb +1 -1
- metadata +8 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 65de6ddc5662f5007981a2d2278f2b76202c31f02cc81fbecc63fdad691342fa
|
4
|
+
data.tar.gz: 4aacea3dc9ec749c160b0f507d5f2c34e271477e89a22456c408141ab7826693
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d4668daecd5ad5bd67bf87a4de8b50153beb44b59a85ac4cacd8453ce3d1d866ede2b123fec4be62daf4d2ebd5df68d17ba74c4daa44e87f74472433ddd5145c
|
7
|
+
data.tar.gz: c07121b824e52773f0b74e863dee3df2b1a026743296c948d07e59653028506b121d17a85a0c86766a3a303d8194519040cab5075f4f505deb3c73fa99b0e7a9
|
data/README.md
CHANGED
@@ -2,38 +2,43 @@
|
|
2
2
|
|
3
3
|
[![fastlane Plugin Badge](https://rawcdn.githack.com/fastlane/fastlane/master/fastlane/assets/plugin-badge.svg)](https://rubygems.org/gems/fastlane-plugin-upload_dsym_to_bugly)
|
4
4
|
|
5
|
-
## Getting Started
|
6
5
|
|
7
|
-
|
6
|
+
## Note
|
7
|
+
2021 年 6 月 28 日 开始,bugly 不再支持使用 openApi 的方式上传符号表,需要使用官方提供的命令行上传工具进行上传。
|
8
|
+
本插件当前使用的工具版本为:__3.3.4__
|
8
9
|
|
9
|
-
|
10
|
-
fastlane add_plugin upload_dsym_to_bugly
|
11
|
-
```
|
12
|
-
|
13
|
-
## About upload_dsym_to_bugly
|
10
|
+
另外去除了上传 ipa 到 bugly 的 action。
|
14
11
|
|
15
|
-
|
12
|
+
## Getting Started
|
16
13
|
|
17
|
-
|
14
|
+
This project is a [_fastlane_](https://github.com/fastlane/fastlane) plugin. To get started with `fastlane-plugin-upload_dsym_to_bugly`, add it to your project by running:
|
18
15
|
|
19
|
-
|
16
|
+
```shell
|
17
|
+
$ fastlane add_plugin upload_dsym_to_bugly
|
18
|
+
```
|
20
19
|
|
21
|
-
|
20
|
+
add the following to your `fastfile`
|
21
|
+
```ruby
|
22
|
+
lane :upload_dysm do
|
23
|
+
upload_dsym_to_bugly(
|
24
|
+
file_path: "<path/to/your/x.app.dSYM.zip",
|
25
|
+
app_key: "<your app_key>",
|
26
|
+
app_id:"<your app_id>",
|
27
|
+
bundle_id: '<your bundle id>',
|
28
|
+
version: get_version_number,
|
29
|
+
raise_if_error: false
|
30
|
+
)
|
31
|
+
end
|
32
|
+
```
|
22
33
|
|
23
|
-
|
34
|
+
## About upload_dsym_to_bugly
|
24
35
|
|
25
|
-
|
36
|
+
upload dSYM to bugly
|
26
37
|
|
27
|
-
|
38
|
+
## Using _fastlane_ Plugins
|
28
39
|
|
29
|
-
|
30
|
-
rake
|
31
|
-
```
|
40
|
+
For more information about how the `fastlane` plugin system works, check out the [Plugins documentation](https://docs.fastlane.tools/plugins/create-plugin/).
|
32
41
|
|
33
|
-
To automatically fix many of the styling issues, use
|
34
|
-
```
|
35
|
-
rubocop -a
|
36
|
-
```
|
37
42
|
|
38
43
|
## Issues and Feedback
|
39
44
|
|
@@ -43,10 +48,6 @@ For any other issues and feedback about this plugin, please submit it to this re
|
|
43
48
|
|
44
49
|
If you have trouble using plugins, check out the [Plugins Troubleshooting](https://docs.fastlane.tools/plugins/plugins-troubleshooting/) guide.
|
45
50
|
|
46
|
-
## Using _fastlane_ Plugins
|
47
|
-
|
48
|
-
For more information about how the `fastlane` plugin system works, check out the [Plugins documentation](https://docs.fastlane.tools/plugins/create-plugin/).
|
49
|
-
|
50
51
|
## About _fastlane_
|
51
52
|
|
52
53
|
_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).
|
@@ -1,11 +1,58 @@
|
|
1
|
-
require
|
2
|
-
require_relative
|
1
|
+
require "fastlane/action"
|
2
|
+
require_relative "../helper/upload_dsym_to_bugly_helper"
|
3
|
+
require 'fileutils'
|
3
4
|
|
4
5
|
module Fastlane
|
5
6
|
module Actions
|
7
|
+
module SharedValues
|
8
|
+
UPLOAD_DSYM_TO_BUGLY_RESULT = :UPLOAD_DSYM_TO_BUGLY_RESULT
|
9
|
+
end
|
6
10
|
class UploadDsymToBuglyAction < Action
|
7
11
|
def self.run(params)
|
8
|
-
|
12
|
+
|
13
|
+
jar_path = File.expand_path('../../jars/buglyqq-upload-symbol-3.3.4.jar', __FILE__)
|
14
|
+
UI.message "jar path: #{jar_path}"
|
15
|
+
|
16
|
+
file_path = File.expand_path("#{params[:file_path]}")
|
17
|
+
UI.message "file path: #{file_path}"
|
18
|
+
|
19
|
+
unzip_path = File.expand_path(".upload_dsym_to_bugly_tmp", "#{File.dirname("#{file_path}")}")
|
20
|
+
UI.message "unzip path: #{unzip_path}"
|
21
|
+
|
22
|
+
if Dir.exist?(unzip_path)
|
23
|
+
FileUtils.rm_r(unzip_path, force: true)
|
24
|
+
end
|
25
|
+
|
26
|
+
if !Dir.glob(file_path).empty?
|
27
|
+
sh("unzip -o #{file_path} -d #{unzip_path}")
|
28
|
+
else
|
29
|
+
UI.message "dSYM zip File don't exist"
|
30
|
+
Actions.lane_context[SharedValues::UPLOAD_DSYM_TO_BUGLY_RESULT] = false
|
31
|
+
raise if params[:raise_if_error]
|
32
|
+
end
|
33
|
+
cmd = "java -jar #{jar_path} -appid #{params[:app_id]} -appkey #{params[:app_key]} -bundleid #{params[:bundle_id]} -version #{params[:version]} -platform #{params[:platform]} -inputSymbol #{unzip_path}"
|
34
|
+
|
35
|
+
log_file = "dSYM_upload_result.log"
|
36
|
+
|
37
|
+
begin
|
38
|
+
sh("#{cmd} > #{log_file}")
|
39
|
+
last_line = sh("tail -n 1 #{log_file}")
|
40
|
+
|
41
|
+
success = last_line.include?("retCode: 200") and last_line.include?("\"msg\":\"success\"")
|
42
|
+
if success
|
43
|
+
UI.message "dSYM upload successfully 🎉 "
|
44
|
+
Actions.lane_context[SharedValues::UPLOAD_DSYM_TO_BUGLY_RESULT] = true
|
45
|
+
else
|
46
|
+
UI.message "dSYM upload failed: #{last_line}"
|
47
|
+
Actions.lane_context[SharedValues::UPLOAD_DSYM_TO_BUGLY_RESULT] = false
|
48
|
+
raise if params[:raise_if_error]
|
49
|
+
end
|
50
|
+
|
51
|
+
rescue => exception
|
52
|
+
UI.message "dSYM upload failed, See log output above"
|
53
|
+
Actions.lane_context[SharedValues::UPLOAD_DSYM_TO_BUGLY_RESULT] = false
|
54
|
+
raise if params[:raise_if_error]
|
55
|
+
end
|
9
56
|
end
|
10
57
|
|
11
58
|
def self.description
|
@@ -27,70 +74,62 @@ module Fastlane
|
|
27
74
|
|
28
75
|
def self.available_options
|
29
76
|
[
|
30
|
-
# FastlaneCore::ConfigItem.new(key: :your_option,
|
31
|
-
# env_name: "UPLOAD_DSYM_TO_BUGLY_YOUR_OPTION",
|
32
|
-
# description: "A description of your option",
|
33
|
-
# optional: false,
|
34
|
-
# type: String)
|
35
|
-
FastlaneCore::ConfigItem.new(key: :api_version,
|
36
|
-
env_name: "FL_UPLOAD_DSYM_TO_BUGLY_API_VERSION",
|
37
|
-
description: "api version for UploadDsymToBuglyAction",
|
38
|
-
is_string: false,
|
39
|
-
default_value: 1),
|
40
77
|
FastlaneCore::ConfigItem.new(key: :app_id,
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
78
|
+
env_name: "FL_UPLOAD_DSYM_TO_BUGLY_APP_ID",
|
79
|
+
description: "app id",
|
80
|
+
is_string: true,
|
81
|
+
verify_block: proc do |value|
|
82
|
+
UI.user_error!("No APP id for UploadDsymToBuglyAction given, pass using `app_id: 'app_id'`") unless (value and not value.empty?)
|
83
|
+
end),
|
47
84
|
FastlaneCore::ConfigItem.new(key: :app_key,
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
FastlaneCore::ConfigItem.new(key: :symbol_type,
|
55
|
-
env_name: "FL_UPLOAD_DSYM_TO_BUGLY_SYMBOL_TYPE",
|
56
|
-
description: "symbol type for UploadDsymToBuglyAction",
|
57
|
-
is_string: false,
|
58
|
-
verify_block: proc do |value|
|
59
|
-
UI.user_error!("No symbol type for UploadDsymToBuglyAction given, pass using `symbol_type: 'symbol_type'`") unless (value and not value.to_s.empty?)
|
60
|
-
end),
|
85
|
+
env_name: "FL_UPLOAD_DSYM_TO_BUGLY_APP_KEY",
|
86
|
+
description: "app key",
|
87
|
+
is_string: true,
|
88
|
+
verify_block: proc do |value|
|
89
|
+
UI.user_error!("No APP key for UploadDsymToBuglyAction given, pass using `api_key: 'app_key'`") unless (value and not value.empty?)
|
90
|
+
end),
|
61
91
|
FastlaneCore::ConfigItem.new(key: :bundle_id,
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
FastlaneCore::ConfigItem.new(key: :
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
FastlaneCore::ConfigItem.new(key: :channel,
|
76
|
-
env_name: "FL_UPLOAD_DSYM_TO_BUGLY_CHANNEL",
|
77
|
-
description: "channel for UploadDsymToBuglyAction",
|
78
|
-
is_string: true,
|
79
|
-
default_value: "fastlane"),
|
80
|
-
FastlaneCore::ConfigItem.new(key: :file_name,
|
81
|
-
env_name: "FL_UPLOAD_DSYM_TO_BUGLY_FILE_NAME",
|
82
|
-
description: "file name for UploadDsymToBuglyAction",
|
83
|
-
is_string: true,
|
84
|
-
verify_block: proc do |value|
|
85
|
-
UI.user_error!("No symbol type for UploadDsymToBuglyAction given, pass using `file_name: 'file_name'`") unless (value and not value.empty?)
|
86
|
-
end),
|
92
|
+
env_name: "FL_UPLOAD_DSYM_TO_BUGLY_BUNDLE_ID",
|
93
|
+
description: "bundle id",
|
94
|
+
is_string: true,
|
95
|
+
verify_block: proc do |value|
|
96
|
+
UI.user_error!("No symbol type for UploadDsymToBuglyAction given, pass using `bundle_id: 'bundle_id'`") unless (value and not value.empty?)
|
97
|
+
end),
|
98
|
+
FastlaneCore::ConfigItem.new(key: :version,
|
99
|
+
env_name: "FL_UPLOAD_DSYM_TO_BUGLY_VERSION",
|
100
|
+
description: "app version",
|
101
|
+
is_string: true,
|
102
|
+
verify_block: proc do |value|
|
103
|
+
UI.user_error!("No symbol type for UploadDsymToBuglyAction given, pass using `version: 'version'`") unless (value and not value.empty?)
|
104
|
+
end),
|
87
105
|
FastlaneCore::ConfigItem.new(key: :file_path,
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
106
|
+
env_name: "FL_UPLOAD_DSYM_TO_BUGLY_FILE",
|
107
|
+
description: "file path",
|
108
|
+
is_string: true,
|
109
|
+
verify_block: proc do |value|
|
110
|
+
UI.user_error!("No symbol type for UploadDsymToBuglyAction given, pass using `file_path: 'file_path'`") unless (value and not value.empty?)
|
111
|
+
end),
|
112
|
+
FastlaneCore::ConfigItem.new(key: :platform,
|
113
|
+
env_name: "FL_UPLOAD_DSYM_TO_BUGLY_FILE",
|
114
|
+
description: "platform",
|
115
|
+
is_string: true,
|
116
|
+
default_value: "IOS",
|
117
|
+
verify_block: proc do |value|
|
118
|
+
UI.user_error!("platform value error, available values: IOS, Android") unless (value == "IOS" or value == "Android")
|
119
|
+
end),
|
120
|
+
FastlaneCore::ConfigItem.new(key: :raise_if_error,
|
121
|
+
env_name: "FL_UPLOAD_DSYM_TO_BUGLY_RAISE_IF_ERROR",
|
122
|
+
description: "Raises an error if fails, so you can fail CI/CD jobs if necessary \(true/false)",
|
123
|
+
default_value: true,
|
124
|
+
is_string: false,
|
125
|
+
type: Boolean,
|
126
|
+
optional: false)
|
127
|
+
]
|
128
|
+
end
|
129
|
+
|
130
|
+
def self.output
|
131
|
+
[
|
132
|
+
["UPLOAD_DSYM_TO_BUGLY_RESULT", "upload result"],
|
94
133
|
]
|
95
134
|
end
|
96
135
|
|
Binary file
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fastlane-plugin-upload_dsym_to_bugly
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- liubo
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-06-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pry
|
@@ -136,7 +136,7 @@ dependencies:
|
|
136
136
|
- - ">="
|
137
137
|
- !ruby/object:Gem::Version
|
138
138
|
version: 2.108.0
|
139
|
-
description:
|
139
|
+
description:
|
140
140
|
email: liubo004@126.com
|
141
141
|
executables: []
|
142
142
|
extensions: []
|
@@ -147,12 +147,13 @@ files:
|
|
147
147
|
- lib/fastlane/plugin/upload_dsym_to_bugly.rb
|
148
148
|
- lib/fastlane/plugin/upload_dsym_to_bugly/actions/upload_dsym_to_bugly_action.rb
|
149
149
|
- lib/fastlane/plugin/upload_dsym_to_bugly/helper/upload_dsym_to_bugly_helper.rb
|
150
|
+
- lib/fastlane/plugin/upload_dsym_to_bugly/jars/buglyqq-upload-symbol-3.3.4.jar
|
150
151
|
- lib/fastlane/plugin/upload_dsym_to_bugly/version.rb
|
151
152
|
homepage: https://github.com/srv7/fastlane-plugin-upload_dsym_to_bugly
|
152
153
|
licenses:
|
153
154
|
- MIT
|
154
155
|
metadata: {}
|
155
|
-
post_install_message:
|
156
|
+
post_install_message:
|
156
157
|
rdoc_options: []
|
157
158
|
require_paths:
|
158
159
|
- lib
|
@@ -167,9 +168,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
167
168
|
- !ruby/object:Gem::Version
|
168
169
|
version: '0'
|
169
170
|
requirements: []
|
170
|
-
|
171
|
-
|
172
|
-
signing_key:
|
171
|
+
rubygems_version: 3.1.2
|
172
|
+
signing_key:
|
173
173
|
specification_version: 4
|
174
174
|
summary: upload_dsym_to_bugly
|
175
175
|
test_files: []
|