fastlane-plugin-bugsnag 2.0.0 → 2.1.0
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cb02bbcd07f8414b53af7ca55a5f34f5ac8179277956fcb3844a51df3c0e876d
|
4
|
+
data.tar.gz: 730aba51c05865a47636d8238771dbbe877b06d31ea47b7027ef0b790857edfc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 78559861f0166bbd2289efb4680737fcc7f72a40c7f0453ddeea8579caa30f599733f21d3d69dd51029b8ffe876d52a12119ab6e67969d54b7fd42f296976323
|
7
|
+
data.tar.gz: 9b98fddce9e3f8cc31ca6d5ac077f29f8e5d464a1026ce67dca80bc70024efb06b9e3e90d3e2242e002721e4b47184c6983086d9c692ac490012b70cb2007d79
|
data/bugsnag-dsym-upload
CHANGED
@@ -13,18 +13,22 @@
|
|
13
13
|
function print_usage() {
|
14
14
|
echo "Usage: $0 [--symbol-maps DIR] dSYMS_PATH"
|
15
15
|
echo
|
16
|
-
echo "-h, --help
|
17
|
-
echo "-v, --verbose
|
18
|
-
echo "--api-key API_KEY
|
19
|
-
echo "--symbol-maps DIR
|
20
|
-
echo "
|
21
|
-
echo "
|
22
|
-
echo "--upload-server URL
|
23
|
-
echo "
|
24
|
-
echo "--project-root DIR
|
25
|
-
echo "
|
26
|
-
echo "
|
27
|
-
echo "
|
16
|
+
echo "-h, --help Displays this message"
|
17
|
+
echo "-v, --verbose Print verbose logging output during execution"
|
18
|
+
echo "--api-key API_KEY The API key of the project the dSYM should be applied to"
|
19
|
+
echo "--symbol-maps DIR Path to a directory of bitcode symbol maps. The"
|
20
|
+
echo " dSYM files will be restored with symbols prior to"
|
21
|
+
echo " upload. Requires dsymutil."
|
22
|
+
echo "--upload-server URL The server receiving dSYM files. Set this value if"
|
23
|
+
echo " using an on-premise Bugsnag installation"
|
24
|
+
echo "--project-root DIR The root directory of the project. This will help to"
|
25
|
+
echo " group error reports by project"
|
26
|
+
echo "--ignore-missing-dwarf Throw warnings instead of errors when a dSYM with missing"
|
27
|
+
echo " DWARF data is found"
|
28
|
+
echo "--ignore-empty-dsym Throw warnings instead of errors when a *.dSYM file is found"
|
29
|
+
echo " rather than the expected *.dSYM directory"
|
30
|
+
echo "dSYMS_PATH A directory or .zip file containing *.dSYM bundles to"
|
31
|
+
echo " upload"
|
28
32
|
}
|
29
33
|
|
30
34
|
function exit_with_usage() {
|
@@ -50,6 +54,8 @@ upload_server=https://upload.bugsnag.com
|
|
50
54
|
unset symbol_maps
|
51
55
|
unset dsym_dir
|
52
56
|
unset verbose
|
57
|
+
unset ignore_empty_dsym
|
58
|
+
unset ignore_missing_dwarf
|
53
59
|
unset silent
|
54
60
|
unset project_root
|
55
61
|
unset api_key
|
@@ -65,6 +71,12 @@ while [[ $# -gt 0 ]]; do
|
|
65
71
|
-v|--verbose)
|
66
72
|
verbose=1
|
67
73
|
shift;;
|
74
|
+
--ignore-missing-dwarf)
|
75
|
+
ignore_missing_dwarf=1
|
76
|
+
shift;;
|
77
|
+
--ignore-empty-dsym)
|
78
|
+
ignore_empty_dsym=1
|
79
|
+
shift;;
|
68
80
|
--symbol-maps)
|
69
81
|
symbol_maps=$2
|
70
82
|
shift
|
@@ -117,11 +129,27 @@ fi
|
|
117
129
|
|
118
130
|
log_verbose "Uploading files to $upload_server"
|
119
131
|
success_count=0
|
132
|
+
warning_count=0
|
120
133
|
fail_count=0
|
121
134
|
|
122
|
-
|
135
|
+
# Find all files and directories matching *.dSYM, except those in dir __MAXCOSX generated when using macOS Archive Utility
|
136
|
+
for dsym in $(find $dsym_dir -name "*.dSYM" ! -path "*/__MACOSX/*"); do
|
123
137
|
log_verbose "Preparing to upload $dsym"
|
124
138
|
|
139
|
+
# check if the .dSYM is a file. Throw an error (warning if --ignore-empty-dsym set) if detected as such;
|
140
|
+
# it should be a directory. This can happen due to a bug in Xcode: https://developer.apple.com/forums/thread/659187
|
141
|
+
if [ -f $dsym ]; then
|
142
|
+
dsym_size=$(wc -c < "$dsym" | xargs)
|
143
|
+
if [[ $ignore_empty_dsym == 1 ]]; then
|
144
|
+
log "[WARNING] Skipping $dsym as it is a file ($dsym_size bytes), not a directory with DWARF data";
|
145
|
+
warning_count=$((warning_count+1))
|
146
|
+
else
|
147
|
+
log "[ERROR] Skipping $dsym as it is a file ($dsym_size bytes), not a directory with DWARF data";
|
148
|
+
fail_count=$((fail_count+1))
|
149
|
+
fi
|
150
|
+
continue
|
151
|
+
fi
|
152
|
+
|
125
153
|
if [[ -d $symbol_maps ]]; then
|
126
154
|
log_verbose "Updating file with bitcode symbol maps in $symbol_maps"
|
127
155
|
dsymutil "$dsym" --symbol-map "$symbol_maps"
|
@@ -129,8 +157,13 @@ for dsym in $dsym_dir/*.dSYM; do
|
|
129
157
|
|
130
158
|
dwarf_data=$dsym/Contents/Resources/DWARF
|
131
159
|
if [[ ! -d $dwarf_data ]]; then
|
132
|
-
|
133
|
-
|
160
|
+
if [[ $ignore_missing_dwarf == 1 ]]; then
|
161
|
+
log "[WARNING] Skipping file missing DWARF data: $dsym"
|
162
|
+
warning_count=$((warning_count+1))
|
163
|
+
else
|
164
|
+
log "[ERROR] Skipping file missing DWARF data: $dsym"
|
165
|
+
fail_count=$((fail_count+1))
|
166
|
+
fi
|
134
167
|
continue
|
135
168
|
fi
|
136
169
|
for file in $dwarf_data/*; do
|
@@ -150,29 +183,40 @@ for dsym in $dsym_dir/*.dSYM; do
|
|
150
183
|
|
151
184
|
# We need to shell out to perform the curl as there seems to be some indirect
|
152
185
|
# wrapping of this script which causes the command to fail if called directly.
|
153
|
-
curl_cmd="curl --fail --silent --show-error --http1.1 $upload_server -F dsym=@\"$file\" $args"
|
186
|
+
curl_cmd="curl --fail --silent --show-error --http1.1 $upload_server -F 'dsym=@\"$file\"' $args"
|
154
187
|
output=$(sh -c "$curl_cmd")
|
155
188
|
|
156
189
|
if [ $? -eq 0 ] && [ "$output" != "invalid apiKey" ]; then
|
157
190
|
success_count=$((success_count+1))
|
158
191
|
else
|
159
192
|
fail_count=$((fail_count+1))
|
160
|
-
|
193
|
+
log "[ERROR] Failed to upload file: $file"
|
161
194
|
fi
|
162
195
|
echo $output | grep -v '^OK$'
|
163
196
|
log
|
164
197
|
else
|
165
|
-
|
198
|
+
log "[ERROR] Skipping file without UUID: $file"
|
166
199
|
fail_count=$((fail_count+1))
|
167
200
|
fi
|
168
201
|
done
|
169
202
|
done
|
170
203
|
|
204
|
+
exit_code=0
|
171
205
|
if [ $success_count -gt 0 ]; then
|
172
|
-
log "$success_count
|
206
|
+
log "$success_count file(s) uploaded successfully"
|
207
|
+
fi
|
208
|
+
|
209
|
+
if [ $warning_count -gt 0 ]; then
|
210
|
+
log "$warning_count file(s) failed to upload with warnings"
|
173
211
|
fi
|
174
212
|
|
175
213
|
if [ $fail_count -gt 0 ]; then
|
176
|
-
|
177
|
-
|
214
|
+
exit_code=1
|
215
|
+
log "$fail_count file(s) failed to upload with errors"
|
216
|
+
fi
|
217
|
+
|
218
|
+
if [[ $fail_count -gt 0 || $warning_count -gt 0 ]] && [[ $verbose != 1 ]]; then
|
219
|
+
log "Re-run the bugsnag-dsym-upload tool with the --verbose option for more information"
|
178
220
|
fi
|
221
|
+
|
222
|
+
exit $exit_code
|
@@ -225,7 +225,7 @@ module Fastlane
|
|
225
225
|
end
|
226
226
|
|
227
227
|
def self.default_info_plist_path
|
228
|
-
Dir.glob("./{ios/,}*/Info.plist").reject {|path| path =~ /build|test/i }.first
|
228
|
+
Dir.glob("./{ios/,}*/Info.plist").reject {|path| path =~ /build|test/i }.sort.first
|
229
229
|
end
|
230
230
|
|
231
231
|
def self.load_options_from_plist file_path
|
@@ -245,12 +245,12 @@ module Fastlane
|
|
245
245
|
end
|
246
246
|
|
247
247
|
def self.default_android_manifest_path
|
248
|
-
Dir.glob("./{android/,}{app,}/src/main/AndroidManifest.xml").first
|
248
|
+
Dir.glob("./{android/,}{app,}/src/main/AndroidManifest.xml").sort.first
|
249
249
|
end
|
250
250
|
|
251
251
|
def self.load_options_from_xml file_path
|
252
252
|
options = options_from_android_manifest(file_path)
|
253
|
-
build_gradle_path = Dir.glob("{android/,}app/build.gradle").first || Dir.glob("build.gradle").first
|
253
|
+
build_gradle_path = Dir.glob("{android/,}app/build.gradle").sort.first || Dir.glob("build.gradle").sort.first
|
254
254
|
options.merge!(options_from_build_gradle(build_gradle_path)) if build_gradle_path
|
255
255
|
return options
|
256
256
|
end
|
@@ -23,7 +23,7 @@ module Fastlane
|
|
23
23
|
|
24
24
|
parse_dsym_paths(params[:dsym_path]).each do |dsym_path|
|
25
25
|
if dsym_path.end_with?(".zip") or File.directory?(dsym_path)
|
26
|
-
args = upload_args(dsym_path, params[:symbol_maps_path], params[:upload_url], params[:project_root], api_key, verbose)
|
26
|
+
args = upload_args(dsym_path, params[:symbol_maps_path], params[:upload_url], params[:project_root], api_key, verbose, params[:ignore_missing_dwarf], params[:ignore_empty_dsym])
|
27
27
|
success = Kernel.system(UPLOAD_SCRIPT_PATH, *args)
|
28
28
|
if success
|
29
29
|
UI.success("Uploaded dSYMs in #{dsym_path}")
|
@@ -112,6 +112,18 @@ module Fastlane
|
|
112
112
|
description: "Root path of the project",
|
113
113
|
default_value: Dir::pwd,
|
114
114
|
optional: true),
|
115
|
+
FastlaneCore::ConfigItem.new(key: :ignore_missing_dwarf,
|
116
|
+
env_name: "BUGSNAG_IGNORE_MISSING_DWARF",
|
117
|
+
description: "Throw warnings instead of errors when a dSYM with missing DWARF data is found",
|
118
|
+
optional: true,
|
119
|
+
default_value: false,
|
120
|
+
is_string: false),
|
121
|
+
FastlaneCore::ConfigItem.new(key: :ignore_empty_dsym,
|
122
|
+
env_name: "BUGSNAG_IGNORE_EMPTY_DSYM",
|
123
|
+
description: "Throw warnings instead of errors when a *.dSYM file is found rather than the expected *.dSYM directory",
|
124
|
+
optional: true,
|
125
|
+
default_value: false,
|
126
|
+
is_string: false),
|
115
127
|
FastlaneCore::ConfigItem.new(key: :config_file,
|
116
128
|
env_name: "BUGSNAG_CONFIG_FILE",
|
117
129
|
description: "Info.plist location",
|
@@ -125,7 +137,7 @@ module Fastlane
|
|
125
137
|
def self.default_info_plist_path
|
126
138
|
# Find first 'Info.plist' in the current working directory
|
127
139
|
# ignoring any in 'build', or 'test' folders
|
128
|
-
return Dir.glob("./{ios/,}*/Info.plist").reject{|path| path =~ /build|test/i }.first
|
140
|
+
return Dir.glob("./{ios/,}*/Info.plist").reject{|path| path =~ /build|test/i }.sort.first
|
129
141
|
end
|
130
142
|
|
131
143
|
def self.options_from_info_plist file_path
|
@@ -143,8 +155,10 @@ module Fastlane
|
|
143
155
|
}
|
144
156
|
end
|
145
157
|
|
146
|
-
def self.upload_args dir, symbol_maps_dir, upload_url, project_root, api_key, verbose
|
158
|
+
def self.upload_args dir, symbol_maps_dir, upload_url, project_root, api_key, verbose, ignore_missing_dwarf, ignore_empty_dsym
|
147
159
|
args = [verbose ? "--verbose" : "--silent"]
|
160
|
+
args += ["--ignore-missing-dwarf"] if ignore_missing_dwarf
|
161
|
+
args += ["--ignore-empty-dsym"] if ignore_empty_dsym
|
148
162
|
args += ["--api-key", api_key] unless api_key.nil?
|
149
163
|
args += ["--upload-server", upload_url] unless upload_url.nil?
|
150
164
|
args += ["--symbol-maps", symbol_maps_dir] unless symbol_maps_dir.nil?
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fastlane-plugin-bugsnag
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Delisa Mason
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-07-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: xml-simple
|
@@ -108,6 +108,20 @@ dependencies:
|
|
108
108
|
- - ">="
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: parallel
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - "<"
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: 1.20.0
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - "<"
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: 1.20.0
|
111
125
|
- !ruby/object:Gem::Dependency
|
112
126
|
name: fastlane
|
113
127
|
requirement: !ruby/object:Gem::Requirement
|
@@ -122,7 +136,7 @@ dependencies:
|
|
122
136
|
- - ">="
|
123
137
|
- !ruby/object:Gem::Version
|
124
138
|
version: 2.28.5
|
125
|
-
description:
|
139
|
+
description:
|
126
140
|
email: iskanamagus@gmail.com
|
127
141
|
executables: []
|
128
142
|
extensions: []
|
@@ -153,7 +167,7 @@ homepage: https://github.com/bugsnag/bugsnag-dsym-upload
|
|
153
167
|
licenses:
|
154
168
|
- MIT
|
155
169
|
metadata: {}
|
156
|
-
post_install_message:
|
170
|
+
post_install_message:
|
157
171
|
rdoc_options: []
|
158
172
|
require_paths:
|
159
173
|
- lib
|
@@ -169,7 +183,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
169
183
|
version: '0'
|
170
184
|
requirements: []
|
171
185
|
rubygems_version: 3.0.3
|
172
|
-
signing_key:
|
186
|
+
signing_key:
|
173
187
|
specification_version: 4
|
174
188
|
summary: Uploads dSYM files to Bugsnag
|
175
189
|
test_files:
|