Skip to content

Commit 8da8e1d

Browse files
authored
Add additional path to check for ios dsyms (#342)
* Add additional path to check for ios dsyms * Add test * Update * Update sentry_dart_plugin.dart
1 parent 0d4ba97 commit 8da8e1d

File tree

3 files changed

+24
-3
lines changed

3 files changed

+24
-3
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Changelog
22

3+
## Unreleased
4+
5+
### Fixes
6+
7+
- Add additional path to check for iOS debug symbols ([#342](https://github.com/getsentry/sentry-dart-plugin/pull/342))
8+
39
## 3.1.0
410

511
### Features

lib/sentry_dart_plugin.dart

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ class SentryDartPlugin {
102102

103103
Stream<String> _enumerateDebugSymbolPaths(FileSystem fs) async* {
104104
final buildDir = _configuration.buildFilesFolder;
105+
final projectRoot = fs.currentDirectory.path;
105106

106107
// Android (apk, appbundle)
107108
yield '$buildDir/app/outputs';
@@ -142,6 +143,9 @@ class SentryDartPlugin {
142143

143144
// iOS (ios-framework)
144145
yield '$buildDir/ios/framework/Release';
146+
147+
// iOS in Fastlane
148+
yield '$projectRoot/ios/build';
145149
}
146150

147151
Future<Set<String>> _enumerateSymbolFiles() async {

test/plugin_test.dart

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -406,6 +406,7 @@ void main() {
406406
const version = '1.0.0';
407407
final config = 'upload_debug_symbols: true';
408408

409+
// Default output directories in build/
409410
final outputDirectories = [
410411
'app/outputs',
411412
'app/intermediates',
@@ -420,22 +421,32 @@ void main() {
420421
'ios/Release-iphoneos',
421422
'ios/Release-anyrandomflavor-iphoneos',
422423
'ios/archive',
423-
'ios/framework/Release'
424+
'ios/framework/Release',
424425
];
426+
// Alternative output directories from 'root'
427+
final alternativeOutputDirectories = ['ios/build'];
425428
for (final dir in outputDirectories) {
426429
fs
427430
.directory(buildDir)
428431
.childDirectory(dir)
429432
.createSync(recursive: true);
430433
}
434+
for (final dir in alternativeOutputDirectories) {
435+
fs
436+
.directory(buildDir)
437+
.childDirectory(dir)
438+
.createSync(recursive: true);
439+
}
431440

432441
final commandLog = await runWith(version, config);
433442

434443
for (final dir in outputDirectories) {
435444
expect(
436445
commandLog,
437-
contains(
438-
'$cli $commonArgs debug-files upload $orgAndProject $buildDir/$dir'));
446+
contains(anyOf([
447+
'$cli $commonArgs debug-files upload $orgAndProject $buildDir/$dir',
448+
'$cli $commonArgs debug-files upload $orgAndProject $dir'
449+
])));
439450
}
440451
});
441452
});

0 commit comments

Comments
 (0)