fastlane-plugin-cc_upload_dsym_to_bugly 0.0.1
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 +55 -0
- data/lib/fastlane/plugin/upload_dsym_to_bugly/actions/upload_dsym_to_bugly_action.rb +149 -0
- data/lib/fastlane/plugin/upload_dsym_to_bugly/helper/upload_dsym_to_bugly_helper.rb +16 -0
- data/lib/fastlane/plugin/upload_dsym_to_bugly/jars/buglyqq-upload-symbol.jar +0 -0
- data/lib/fastlane/plugin/upload_dsym_to_bugly/version.rb +5 -0
- data/lib/fastlane/plugin/upload_dsym_to_bugly.rb +16 -0
- metadata +175 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 65c898084a0a23aed0382f29b9709e991881dc5cc086361c9e836fdff3f2a9b3
|
4
|
+
data.tar.gz: ce102f1de215fc5c726a24ef46ec7c2654cc2c85b3f832b257a5d1012ee476a0
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: b0fdf2b9eb931c82cfa624c40282e893a53f42f22fad50b739570b2847e2de5c39ac85279dfe93c7a036fe6f330dc7dd4c18a67b722fca370c8a15a8ad40427c
|
7
|
+
data.tar.gz: f2528e91052bb950e3242d59ec280ba67985ce69e1e5fe291ce0670e605bc42f8aca55b7ffe18a56c7eee36587ea5fc46c40d6e25515d97f21d649a02ab78673
|
data/LICENSE
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2018 liubo <liubo004@126.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,55 @@
|
|
1
|
+
# upload_dsym_to_bugly plugin
|
2
|
+
|
3
|
+
[](https://rubygems.org/gems/fastlane-plugin-upload_dsym_to_bugly)
|
4
|
+
|
5
|
+
|
6
|
+
## Note
|
7
|
+
2021 年 6 月 28 日 开始,bugly 不再支持使用 openApi 的方式上传符号表,需要使用官方提供的命令行上传工具进行上传。
|
8
|
+
本插件当前使用的工具版本为:__3.3.5__
|
9
|
+
|
10
|
+
2023 年 12 月 18 日 增加BuildNumber支持build 号
|
11
|
+
|
12
|
+
|
13
|
+
## Getting Started
|
14
|
+
|
15
|
+
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:
|
16
|
+
|
17
|
+
```shell
|
18
|
+
$ fastlane add_plugin upload_dsym_to_bugly
|
19
|
+
```
|
20
|
+
|
21
|
+
add the following to your `fastfile`
|
22
|
+
```ruby
|
23
|
+
lane :upload_dysm do
|
24
|
+
upload_dsym_to_bugly(
|
25
|
+
file_path: "<path/to/your/x.app.dSYM.zip",
|
26
|
+
app_key: "<your app_key>",
|
27
|
+
app_id:"<your app_id>",
|
28
|
+
bundle_id: '<your bundle id>',
|
29
|
+
version: get_version_number,
|
30
|
+
buildNo: get_build_number,
|
31
|
+
raise_if_error: false
|
32
|
+
)
|
33
|
+
end
|
34
|
+
```
|
35
|
+
|
36
|
+
## About upload_dsym_to_bugly
|
37
|
+
|
38
|
+
upload dSYM to bugly
|
39
|
+
|
40
|
+
## Using _fastlane_ Plugins
|
41
|
+
|
42
|
+
For more information about how the `fastlane` plugin system works, check out the [Plugins documentation](https://docs.fastlane.tools/plugins/create-plugin/).
|
43
|
+
|
44
|
+
|
45
|
+
## Issues and Feedback
|
46
|
+
|
47
|
+
For any other issues and feedback about this plugin, please submit it to this repository.
|
48
|
+
|
49
|
+
## Troubleshooting
|
50
|
+
|
51
|
+
If you have trouble using plugins, check out the [Plugins Troubleshooting](https://docs.fastlane.tools/plugins/plugins-troubleshooting/) guide.
|
52
|
+
|
53
|
+
## About _fastlane_
|
54
|
+
|
55
|
+
_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,149 @@
|
|
1
|
+
require "fastlane/action"
|
2
|
+
require_relative "../helper/upload_dsym_to_bugly_helper"
|
3
|
+
require 'fileutils'
|
4
|
+
|
5
|
+
module Fastlane
|
6
|
+
module Actions
|
7
|
+
module SharedValues
|
8
|
+
UPLOAD_DSYM_TO_BUGLY_RESULT = :UPLOAD_DSYM_TO_BUGLY_RESULT
|
9
|
+
end
|
10
|
+
class UploadDsymToBuglyAction < Action
|
11
|
+
def self.run(params)
|
12
|
+
|
13
|
+
jar_path = File.expand_path('../../jars/buglyqq-upload-symbol.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
|
+
|
34
|
+
java_path = params[:java_path] || 'java'
|
35
|
+
cmd = "#{java_path} -jar \"#{jar_path}\" -appid \"#{params[:app_id]}\" -appkey \"#{params[:app_key]}\" -bundleid \"#{params[:bundle_id]}\" -version \"#{params[:version]}\" -buildNo \"#{params[:buildNo]}\" -platform \"#{params[:platform]}\" -inputSymbol \"#{unzip_path}\""
|
36
|
+
|
37
|
+
log_file = "dSYM_upload_result.log"
|
38
|
+
|
39
|
+
begin
|
40
|
+
sh("#{cmd} > #{log_file}")
|
41
|
+
log_content = File.read("#{log_file}")
|
42
|
+
|
43
|
+
success = log_content.include?("retCode: 200") and log_content.include?("\"msg\":\"所有符号表都已经上传过。\"")
|
44
|
+
if success
|
45
|
+
UI.success " 🎉 🎉 🎉 dSYM upload successfully (づ。◕‿‿◕。)づ"
|
46
|
+
Actions.lane_context[SharedValues::UPLOAD_DSYM_TO_BUGLY_RESULT] = true
|
47
|
+
else
|
48
|
+
UI.error "┭┮﹏┭┮ dSYM upload failed ┭┮﹏┭┮"
|
49
|
+
Actions.lane_context[SharedValues::UPLOAD_DSYM_TO_BUGLY_RESULT] = false
|
50
|
+
raise if params[:raise_if_error]
|
51
|
+
end
|
52
|
+
|
53
|
+
rescue => exception
|
54
|
+
UI.message "dSYM upload failed, See log output above"
|
55
|
+
Actions.lane_context[SharedValues::UPLOAD_DSYM_TO_BUGLY_RESULT] = false
|
56
|
+
raise if params[:raise_if_error]
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
60
|
+
def self.description
|
61
|
+
"upload_dsym_to_bugly"
|
62
|
+
end
|
63
|
+
|
64
|
+
def self.authors
|
65
|
+
["liubo"]
|
66
|
+
end
|
67
|
+
|
68
|
+
def self.return_value
|
69
|
+
# If your method provides a return value, you can describe here what it does
|
70
|
+
end
|
71
|
+
|
72
|
+
def self.details
|
73
|
+
# Optional:
|
74
|
+
""
|
75
|
+
end
|
76
|
+
|
77
|
+
def self.available_options
|
78
|
+
[
|
79
|
+
FastlaneCore::ConfigItem.new(key: :app_id,
|
80
|
+
env_name: "FL_UPLOAD_DSYM_TO_BUGLY_APP_ID",
|
81
|
+
description: "app id",
|
82
|
+
is_string: true,
|
83
|
+
verify_block: proc do |value|
|
84
|
+
UI.user_error!("No APP id for UploadDsymToBuglyAction given, pass using `app_id: 'app_id'`") unless (value and not value.empty?)
|
85
|
+
end),
|
86
|
+
FastlaneCore::ConfigItem.new(key: :app_key,
|
87
|
+
env_name: "FL_UPLOAD_DSYM_TO_BUGLY_APP_KEY",
|
88
|
+
description: "app key",
|
89
|
+
is_string: true,
|
90
|
+
verify_block: proc do |value|
|
91
|
+
UI.user_error!("No APP key for UploadDsymToBuglyAction given, pass using `api_key: 'app_key'`") unless (value and not value.empty?)
|
92
|
+
end),
|
93
|
+
FastlaneCore::ConfigItem.new(key: :bundle_id,
|
94
|
+
env_name: "FL_UPLOAD_DSYM_TO_BUGLY_BUNDLE_ID",
|
95
|
+
description: "bundle id",
|
96
|
+
is_string: true,
|
97
|
+
verify_block: proc do |value|
|
98
|
+
UI.user_error!("No symbol type for UploadDsymToBuglyAction given, pass using `bundle_id: 'bundle_id'`") unless (value and not value.empty?)
|
99
|
+
end),
|
100
|
+
FastlaneCore::ConfigItem.new(key: :version,
|
101
|
+
env_name: "FL_UPLOAD_DSYM_TO_BUGLY_VERSION",
|
102
|
+
description: "app version",
|
103
|
+
is_string: true,
|
104
|
+
verify_block: proc do |value|
|
105
|
+
UI.user_error!("No symbol type for UploadDsymToBuglyAction given, pass using `version: 'version'`") unless (value and not value.empty?)
|
106
|
+
end),
|
107
|
+
FastlaneCore::ConfigItem.new(key: :file_path,
|
108
|
+
env_name: "FL_UPLOAD_DSYM_TO_BUGLY_FILE",
|
109
|
+
description: "file path",
|
110
|
+
is_string: true,
|
111
|
+
verify_block: proc do |value|
|
112
|
+
UI.user_error!("No symbol type for UploadDsymToBuglyAction given, pass using `file_path: 'file_path'`") unless (value and not value.empty?)
|
113
|
+
end),
|
114
|
+
FastlaneCore::ConfigItem.new(key: :platform,
|
115
|
+
env_name: "FL_UPLOAD_DSYM_TO_BUGLY_FILE",
|
116
|
+
description: "platform",
|
117
|
+
is_string: true,
|
118
|
+
default_value: "IOS",
|
119
|
+
verify_block: proc do |value|
|
120
|
+
UI.user_error!("platform value error, available values: IOS, Android") unless (value == "IOS" or value == "Android")
|
121
|
+
end),
|
122
|
+
FastlaneCore::ConfigItem.new(key: :raise_if_error,
|
123
|
+
env_name: "FL_UPLOAD_DSYM_TO_BUGLY_RAISE_IF_ERROR",
|
124
|
+
description: "Raises an error if fails, so you can fail CI/CD jobs if necessary \(true/false)",
|
125
|
+
default_value: true,
|
126
|
+
is_string: false,
|
127
|
+
type: Boolean,
|
128
|
+
optional: false),
|
129
|
+
FastlaneCore::ConfigItem.new(key: :java_path,
|
130
|
+
env_name: "FL_UPLOAD_DSYM_TO_BUGLY_JAVA_PATH",
|
131
|
+
description: "Use specific Java, instead of system one",
|
132
|
+
default_value: nil,
|
133
|
+
is_string: true,
|
134
|
+
optional: true),
|
135
|
+
]
|
136
|
+
end
|
137
|
+
|
138
|
+
def self.output
|
139
|
+
[
|
140
|
+
["UPLOAD_DSYM_TO_BUGLY_RESULT", "upload result"],
|
141
|
+
]
|
142
|
+
end
|
143
|
+
|
144
|
+
def self.is_supported?(platform)
|
145
|
+
platform == :ios
|
146
|
+
end
|
147
|
+
end
|
148
|
+
end
|
149
|
+
end
|
@@ -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 UploadDsymToBuglyHelper
|
8
|
+
# class methods that you define here become available in your action
|
9
|
+
# as `Helper::UploadDsymToBuglyHelper.your_method`
|
10
|
+
#
|
11
|
+
def self.show_message
|
12
|
+
UI.message("Hello from the upload_dsym_to_bugly plugin helper!")
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
require 'fastlane/plugin/upload_dsym_to_bugly/version'
|
2
|
+
|
3
|
+
module Fastlane
|
4
|
+
module UploadDsymToBugly
|
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::UploadDsymToBugly.all_classes.each do |current|
|
15
|
+
require current
|
16
|
+
end
|
metadata
ADDED
@@ -0,0 +1,175 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: fastlane-plugin-cc_upload_dsym_to_bugly
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- pengchao
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2023-12-19 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.108.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.108.0
|
139
|
+
description:
|
140
|
+
email: hunter858@sina.cn
|
141
|
+
executables: []
|
142
|
+
extensions: []
|
143
|
+
extra_rdoc_files: []
|
144
|
+
files:
|
145
|
+
- LICENSE
|
146
|
+
- README.md
|
147
|
+
- lib/fastlane/plugin/upload_dsym_to_bugly.rb
|
148
|
+
- lib/fastlane/plugin/upload_dsym_to_bugly/actions/upload_dsym_to_bugly_action.rb
|
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.jar
|
151
|
+
- lib/fastlane/plugin/upload_dsym_to_bugly/version.rb
|
152
|
+
homepage: https://github.com/hunter858/cc_upload_dsym_to_bugly
|
153
|
+
licenses:
|
154
|
+
- MIT
|
155
|
+
metadata: {}
|
156
|
+
post_install_message:
|
157
|
+
rdoc_options: []
|
158
|
+
require_paths:
|
159
|
+
- lib
|
160
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
161
|
+
requirements:
|
162
|
+
- - ">="
|
163
|
+
- !ruby/object:Gem::Version
|
164
|
+
version: '0'
|
165
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
166
|
+
requirements:
|
167
|
+
- - ">="
|
168
|
+
- !ruby/object:Gem::Version
|
169
|
+
version: '0'
|
170
|
+
requirements: []
|
171
|
+
rubygems_version: 3.4.10
|
172
|
+
signing_key:
|
173
|
+
specification_version: 4
|
174
|
+
summary: cc_upload_dsym_to_bugly
|
175
|
+
test_files: []
|