From 22b2b3371843876373636241234cb09192966738 Mon Sep 17 00:00:00 2001 From: Ivan Dlugos <6349682+vaind@users.noreply.github.com> Date: Fri, 15 Nov 2024 21:15:42 +0100 Subject: [PATCH] fix: upload only known build output directories (#277) * change build dir default value * add symbols path config & enumarate known build dir paths * collect symbol files from all dirs * add macos & ios rules * chore: add changelog * add missing targets * trim printed logs * upload build files on failure * update apk test * add windows pdb to upload * comments --- .github/workflows/integration-test.yml | 18 +++++- CHANGELOG.md | 10 +++- README.md | 9 ++- example/README.md | 8 ++- lib/sentry_dart_plugin.dart | 80 +++++++++++++++++++++++++- lib/src/configuration.dart | 19 +++--- lib/src/configuration_values.dart | 5 ++ lib/src/utils/extensions.dart | 12 ++++ test/configuration_test.dart | 12 ++-- test/configureation_values_test.dart | 10 +++- test/integration_test.dart | 75 +++++++++++++----------- test/plugin_test.dart | 32 +++++------ 12 files changed, 214 insertions(+), 76 deletions(-) diff --git a/.github/workflows/integration-test.yml b/.github/workflows/integration-test.yml index fd123a2..0f05c2a 100644 --- a/.github/workflows/integration-test.yml +++ b/.github/workflows/integration-test.yml @@ -9,7 +9,7 @@ on: jobs: integration-test: - name: ${{ matrix.target }} @ ${{ matrix.host }} + name: ${{ matrix.target }} runs-on: ${{ matrix.host }}-latest strategy: fail-fast: false @@ -17,14 +17,22 @@ jobs: include: - host: macos target: macos + - host: macos + target: macos-framework - host: macos target: ios + - host: macos + target: ios-framework + - host: macos + target: ipa - host: ubuntu target: linux - host: ubuntu target: web - host: ubuntu - target: android + target: apk + - host: ubuntu + target: appbundle - host: windows target: windows env: @@ -51,3 +59,9 @@ jobs: key: integration-test-${{ matrix.host }}-${{ matrix.target }}-${{ hashFiles('flutter.version') }} - run: dart test --tags integration + + - uses: actions/upload-artifact@v4 + if: failure() + with: + name: ${{ matrix.target }}-build + path: temp/testapp-${{ matrix.target }}/build diff --git a/CHANGELOG.md b/CHANGELOG.md index 2f6088d..bae24c2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,12 @@ ## Unreleased +### Changes + +- Upload debug symbols for known release build paths and the configured `symbols_path` ([#277](https://github.com/getsentry/sentry-dart-plugin/pull/277)) + Previously, all debug symbols recognized by Sentry CLI were uploaded (starting in the current directory by default). + Now, the plugin checks the paths where `flutter build` outputs debug symbols for release builds and only uploads those. + ### Features - Add urlPrefix to sentry configuration ([#253](https://github.com/getsentry/sentry-dart-plugin/pull/253)) @@ -58,7 +64,7 @@ ### Fixes -- Updated the `process` dependency range to `>=4.2.4 <6.0.0` ([#202](https://github.com/getsentry/sentry-dart-plugin/pull/202)). +- Updated the `process` dependency range to `>=4.2.4 <6.0.0` ([#202](https://github.com/getsentry/sentry-dart-plugin/pull/202)). - This update resolves a version conflict issue when using the `integration_test` package with Flutter version `3.19.0` ## 1.7.0 @@ -70,7 +76,7 @@ ### Dependencies - Bump CLI from v2.21.2 to v2.27.0 ([#180](https://github.com/getsentry/sentry-dart-plugin/pull/180), [#195](https://github.com/getsentry/sentry-dart-plugin/pull/195), [#196](https://github.com/getsentry/sentry-dart-plugin/pull/196)) - - [changelog](https://github.com/getsentry/sentry-cli/blob/master/CHANGELOG.md#2270) + - [changelog](https://github.com/getsentry/sentry-cli/blob/master/CHANGELOG.md#2270) - [diff](https://github.com/getsentry/sentry-cli/compare/2.21.2...2.27.0) ## 1.6.3 diff --git a/README.md b/README.md index 8936f5a..9c71b42 100644 --- a/README.md +++ b/README.md @@ -51,7 +51,9 @@ sentry: log_level: error # possible values: trace, debug, info, warn, error release: ... dist: ... + build_path: ... web_build_path: ... + symbols_path: ... commits: auto ignore_missing: true ``` @@ -80,7 +82,9 @@ wait_for_processing=false log_level=error # possible values: trace, debug, info, warn, error release=... dist=... +build_path: ... web_build_path=... +symbols_path=... commits=auto ignore_missing=true ``` @@ -101,8 +105,9 @@ ignore_missing=true | log_level | Configures the log level for sentry-cli | warn (string) | no | SENTRY_LOG_LEVEL | | release | The release version for source maps, it should match the release set by the SDK | name@version from pubspec (string) | no | SENTRY_RELEASE | | dist | The dist/build number for source maps, it should match the dist set by the SDK | the number after the '+' char from 'version' pubspec (string) | no | SENTRY_DIST | -| build_path | The build folder of debug files for upload | `.` current folder (string) | no | - | -| web_build_path | The web build folder of debug files for upload | `build/web` relative to build_path (string) | no | - | +| build_path | The build folder of debug files for upload | `build` (string) | no | - | +| web_build_path | The web build folder of debug files for upload relative to build_path | `web` (string) | no | - | +| symbols_path | The directory containing debug symbols (i.e. the `--split-debug-info=` parameter value you pass to `flutter build`) | `.` (string) | no | - | | commits | Release commits integration | auto (string) | no | - | | ignore_missing | Ignore missing commits previously used in the release | false (boolean) | no | - | | bin_dir | The folder where the plugin downloads the sentry-cli binary | .dart_tool/pub/bin/sentry_dart_plugin (string) | no | - | diff --git a/example/README.md b/example/README.md index 4fa9240..76dd847 100644 --- a/example/README.md +++ b/example/README.md @@ -37,9 +37,15 @@ sentry: # default 'warning' log_level: error - # default to build/web + # default 'build' + #build_path: ... + + # default 'web' (relative to build_path, i.e. resolves to 'build/web') #web_build_path: ... + # default '.' + #symbols_path: ... + # default to name@version from pubspec #release: ... ``` diff --git a/lib/sentry_dart_plugin.dart b/lib/sentry_dart_plugin.dart index 0294c42..724ff60 100644 --- a/lib/sentry_dart_plugin.dart +++ b/lib/sentry_dart_plugin.dart @@ -1,6 +1,8 @@ import 'dart:convert'; +import 'package:file/file.dart'; import 'package:process/process.dart'; +import 'package:sentry_dart_plugin/src/utils/extensions.dart'; import 'src/configuration.dart'; import 'src/utils/injector.dart'; @@ -10,6 +12,7 @@ import 'src/utils/log.dart'; /// debug symbols and source maps class SentryDartPlugin { late Configuration _configuration; + final symbolFileRegexp = RegExp(r'[/\\]app[^/\\]+.*\.(dSYM|symbols)$'); /// SentryDartPlugin ctor. that inits the injectors SentryDartPlugin() { @@ -75,15 +78,86 @@ class SentryDartPlugin { Log.info('includeSources is disabled, not uploading sources.'); } - params.add(_configuration.buildFilesFolder); - _addWait(params); - await _executeAndLog('Failed to upload symbols', params); + final debugSymbolPaths = _enumerateDebugSymbolPaths(); + final fs = injector.get(); + await for (final path in debugSymbolPaths) { + if (await fs.directory(path).exists() || await fs.file(path).exists()) { + await _executeAndLog('Failed to upload symbols', [...params, path]); + } + } + + for (final path in await _enumerateSymbolFiles()) { + await _executeAndLog('Failed to upload symbols', [...params, path]); + } Log.taskCompleted(taskName); } + Stream _enumerateDebugSymbolPaths() async* { + final buildDir = _configuration.buildFilesFolder; + + // Android (apk, appbundle) + yield '$buildDir/app/outputs'; + yield '$buildDir/app/intermediates'; + + // Windows + for (final subdir in ['', '/x64', '/arm64']) { + yield '$buildDir/windows$subdir/runner/Release'; + } + // TODO we should delete this once we have windows symbols collected automatically. + // Related to https://github.com/getsentry/sentry-dart-plugin/issues/173 + yield 'windows/flutter/ephemeral/flutter_windows.dll.pdb'; + + // Linux + for (final subdir in ['/x64', '/arm64']) { + yield '$buildDir/linux$subdir/release/bundle'; + } + + // macOS + yield '$buildDir/macos/Build/Products/Release'; + + // macOS (macOS-framework) + yield '$buildDir/macos/framework/Release'; + + // iOS + yield '$buildDir/ios/iphoneos/Runner.App'; + yield '$buildDir/ios/Release-iphoneos'; + + // iOS (ipa) + yield '$buildDir/ios/archive'; + + // iOS (ios-framework) + yield '$buildDir/ios/framework/Release'; + } + + Future> _enumerateSymbolFiles() async { + final result = {}; + final fs = injector.get(); + + if (_configuration.symbolsFolder.isNotEmpty) { + final symbolsRootDir = fs.directory(_configuration.symbolsFolder); + if (await symbolsRootDir.exists()) { + await for (final entry in symbolsRootDir.find(symbolFileRegexp)) { + result.add(entry.path); + } + } + } + + // for backward compatibility, also check the build dir if it has been + // configured with a different path. + if (_configuration.buildFilesFolder != _configuration.symbolsFolder) { + final symbolsRootDir = fs.directory(_configuration.buildFilesFolder); + if (await symbolsRootDir.exists()) { + await for (final entry in symbolsRootDir.find(symbolFileRegexp)) { + result.add(entry.path); + } + } + } + return result; + } + List _releasesCliParams() { final params = []; _setUrlAndTokenAndLog(params); diff --git a/lib/src/configuration.dart b/lib/src/configuration.dart index d62ca64..db1371b 100644 --- a/lib/src/configuration.dart +++ b/lib/src/configuration.dart @@ -15,9 +15,8 @@ import 'utils/log.dart'; class Configuration { late final FileSystem _fs = injector.get(); - // cannot use ${Directory.current.path}/build since --split-debug-info allows - // setting a custom path which is a sibling of build - /// The Build folder, defaults to the current directory. + + /// The Build folder, defaults `build`. late String buildFilesFolder; /// Whether to upload debug symbols, defaults to true @@ -67,9 +66,13 @@ class Configuration { /// The Apps name, defaults to [name] from pubspec late String name; - /// the Web Build folder, defaults to build/web + /// the Web Build folder, defaults to `web`. + /// Relative to the [buildFilesFolder] so the default resolves to `build/web`. late String webBuildFilesFolder; + /// The directory passed to `--split-debug-info`, defaults to '.' + late String symbolsFolder; + /// The URL prefix, defaults to null late String? urlPrefix; @@ -141,13 +144,13 @@ class Configuration { commits = configValues.commits ?? 'auto'; ignoreMissing = configValues.ignoreMissing ?? false; - buildFilesFolder = configValues.buildPath ?? _fs.currentDirectory.path; + buildFilesFolder = configValues.buildPath ?? 'build'; // uploading JS and Map files need to have the correct folder structure - // otherwise symbolication fails, the default path for the web build folder is build/web + // otherwise symbolication fails, the default path for the web build folder is web // but can be customized so making it flexible. - final webBuildPath = - configValues.webBuildPath ?? _fs.path.join('build', 'web'); + final webBuildPath = configValues.webBuildPath ?? 'web'; webBuildFilesFolder = _fs.path.join(buildFilesFolder, webBuildPath); + symbolsFolder = configValues.symbolsPath ?? '.'; project = configValues.project; // or env. var. SENTRY_PROJECT org = configValues.org; // or env. var. SENTRY_ORG diff --git a/lib/src/configuration_values.dart b/lib/src/configuration_values.dart index 3cc3898..13546f4 100644 --- a/lib/src/configuration_values.dart +++ b/lib/src/configuration_values.dart @@ -19,6 +19,7 @@ class ConfigurationValues { final String? dist; final String? buildPath; final String? webBuildPath; + final String? symbolsPath; final String? commits; final bool? ignoreMissing; final String? binDir; @@ -43,6 +44,7 @@ class ConfigurationValues { this.dist, this.buildPath, this.webBuildPath, + this.symbolsPath, this.commits, this.ignoreMissing, this.binDir, @@ -94,6 +96,7 @@ class ConfigurationValues { dist: sentryArguments['dist'], buildPath: sentryArguments['build_path'], webBuildPath: sentryArguments['web_build_path'], + symbolsPath: sentryArguments['symbols_path'], commits: sentryArguments['commits'], ignoreMissing: boolFromString(sentryArguments['ignore_missing']), binDir: sentryArguments['bin_dir'], @@ -127,6 +130,7 @@ class ConfigurationValues { dist: configReader.getString('dist'), buildPath: configReader.getString('build_path'), webBuildPath: configReader.getString('web_build_path'), + symbolsPath: configReader.getString('symbols_path'), commits: configReader.getString('commits'), ignoreMissing: configReader.getBool('ignore_missing'), binDir: configReader.getString('bin_dir'), @@ -180,6 +184,7 @@ class ConfigurationValues { dist: platformEnv.dist ?? args.dist ?? file.dist, buildPath: args.buildPath ?? file.buildPath, webBuildPath: args.webBuildPath ?? file.webBuildPath, + symbolsPath: args.symbolsPath ?? file.symbolsPath, commits: args.commits ?? file.commits, ignoreMissing: args.ignoreMissing ?? file.ignoreMissing, binDir: args.binDir ?? file.binDir, diff --git a/lib/src/utils/extensions.dart b/lib/src/utils/extensions.dart index d6aa4c6..6d6e74c 100644 --- a/lib/src/utils/extensions.dart +++ b/lib/src/utils/extensions.dart @@ -1,4 +1,16 @@ +import 'package:file/file.dart'; + /// Checks if the given String == null extension StringValidations on String? { bool get isNull => this == null; } + +extension DirectorySearch on Directory { + Stream find(RegExp regexp) async* { + await for (final entity in list(recursive: true)) { + if (regexp.hasMatch(entity.path)) { + yield entity; + } + } + } +} diff --git a/test/configuration_test.dart b/test/configuration_test.dart index 8d441ed..42bcb99 100644 --- a/test/configuration_test.dart +++ b/test/configuration_test.dart @@ -69,6 +69,7 @@ void main() { dist: 'dist-args-config', buildPath: 'build_path-args-config', webBuildPath: 'web_build_path-args-config', + symbolsPath: 'symbols_path-args-config', commits: 'commits-args-config', ignoreMissing: true, binDir: 'binDir-args-config', @@ -93,6 +94,7 @@ void main() { dist: 'dist-file-config', buildPath: 'build_path-file-config', webBuildPath: 'web_build_path-file-config', + symbolsPath: 'symbols_path-args-config', commits: 'commits-file-config', ignoreMissing: false, binDir: 'binDir-file-config', @@ -122,6 +124,7 @@ void main() { expect(sut.release, 'release-args-config'); expect(sut.dist, 'dist-args-config'); expect(sut.buildFilesFolder, 'build_path-args-config'); + expect(sut.symbolsFolder, 'symbols_path-args-config'); expect( sut.webBuildFilesFolder, fixture.fs.path.join( @@ -157,6 +160,7 @@ void main() { dist: 'dist-file-config', buildPath: 'build_path-file-config', webBuildPath: 'web_build_path-file-config', + symbolsPath: 'symbols_path-args-config', commits: 'commits-file-config', ignoreMissing: true, binDir: 'binDir-file-config', @@ -187,6 +191,7 @@ void main() { expect(sut.release, 'release-file-config'); expect(sut.dist, 'dist-file-config'); expect(sut.buildFilesFolder, 'build_path-file-config'); + expect(sut.symbolsFolder, 'symbols_path-args-config'); expect( sut.webBuildFilesFolder, fixture.fs.path @@ -218,13 +223,10 @@ void main() { expect(sut.uploadSources, false); expect(sut.commits, 'auto'); expect(sut.ignoreMissing, false); - expect( - sut.buildFilesFolder, - fixture.fs.currentDirectory.path, - ); + expect(sut.buildFilesFolder, 'build'); expect( sut.webBuildFilesFolder, - fixture.fs.path.join(sut.buildFilesFolder, 'build/web'), + fixture.fs.path.join(sut.buildFilesFolder, 'web'), ); expect(sut.waitForProcessing, false); expect(sut.binDir, '.dart_tool/pub/bin/sentry_dart_plugin'); diff --git a/test/configureation_values_test.dart b/test/configureation_values_test.dart index d951e42..6afce69 100644 --- a/test/configureation_values_test.dart +++ b/test/configureation_values_test.dart @@ -29,6 +29,7 @@ void main() { "--sentry-define=dist=fixture-dist", "--sentry-define=build_path=fixture-build_path", "--sentry-define=web_build_path=fixture-web_build_path", + "--sentry-define=symbols_path=fixture-symbols_path", "--sentry-define=commits=fixture-commits", "--sentry-define=ignore_missing=true", "--sentry-define=bin_dir=fixture-bin_dir", @@ -51,6 +52,7 @@ void main() { expect(sut.dist, 'fixture-dist'); expect(sut.buildPath, 'fixture-build_path'); expect(sut.webBuildPath, 'fixture-web_build_path'); + expect(sut.symbolsPath, 'fixture-symbols_path'); expect(sut.commits, 'fixture-commits'); expect(sut.ignoreMissing, true); expect(sut.binDir, 'fixture-bin_dir'); @@ -81,7 +83,7 @@ void main() { test('from config reader as pubspec', () { final sentryPubspec = ''' version: fixture-sentry-version - name: fixture-sentry-name + name: fixture-sentry-name upload_debug_symbols: true upload_source_maps: true upload_sources: true @@ -92,6 +94,7 @@ void main() { dist: fixture-dist build_path: fixture-build_path web_build_path: fixture-web_build_path + symbols_path: fixture-symbols_path commits: fixture-commits ignore_missing: true bin_dir: fixture-bin_dir @@ -133,6 +136,7 @@ void main() { expect(sut.dist, 'fixture-dist'); expect(sut.buildPath, 'fixture-build_path'); expect(sut.webBuildPath, 'fixture-web_build_path'); + expect(sut.symbolsPath, 'fixture-symbols_path'); expect(sut.commits, 'fixture-commits'); expect(sut.ignoreMissing, true); expect(sut.binDir, 'fixture-bin_dir'); @@ -142,7 +146,7 @@ void main() { test('from config reader as properties', () { final sentryProperties = ''' version=fixture-sentry-version - name=fixture-sentry-name + name=fixture-sentry-name upload_debug_symbols=true upload_source_maps=true upload_sources=true @@ -153,6 +157,7 @@ void main() { dist=fixture-dist build_path=fixture-build_path web_build_path=fixture-web_build_path + symbols_path: fixture-symbols_path commits=fixture-commits ignore_missing=true bin_dir=fixture-bin_dir @@ -194,6 +199,7 @@ void main() { expect(sut.dist, 'fixture-dist'); expect(sut.buildPath, 'fixture-build_path'); expect(sut.webBuildPath, 'fixture-web_build_path'); + expect(sut.symbolsPath, 'fixture-symbols_path'); expect(sut.commits, 'fixture-commits'); expect(sut.ignoreMissing, true); expect(sut.binDir, 'fixture-bin_dir'); diff --git a/test/integration_test.dart b/test/integration_test.dart index 42bb757..4a06f3e 100644 --- a/test/integration_test.dart +++ b/test/integration_test.dart @@ -17,9 +17,13 @@ late final String serverUri; final testPlatforms = Platform.environment.containsKey('TEST_PLATFORM') ? [Platform.environment['TEST_PLATFORM']!] : [ - 'android', + 'apk', + 'appbundle', if (Platform.isMacOS) 'macos', + if (Platform.isMacOS) 'macos-framework', if (Platform.isMacOS) 'ios', + if (Platform.isMacOS) 'ios-framework', + if (Platform.isMacOS) 'ipa', if (Platform.isWindows) 'windows', if (Platform.isLinux) 'linux', 'web' @@ -44,27 +48,13 @@ void main() async { testServer = await Process.start('python3', ['test-server.py', serverUri], workingDirectory: '${repoRootDir.path}/test'); - final testServerOutput = StringBuffer(); - final testServerOutputFutures = []; - // capture & forward streams - listener(List data) { - stdout.add(data); - stdout.flush(); - testServerOutput.write(utf8.decode(data)); - } - - testServerOutputFutures.clear(); - testServerOutputFutures.add(testServer.stderr.forEach(listener)); - testServerOutputFutures.add(testServer.stdout.forEach(listener)); + final collector = _ProcessStreamCollector(testServer); stopServer = () async { await http.get(Uri.parse('$serverUri/STOP')); - for (var future in testServerOutputFutures) { - await future; - } expect(await testServer.exitCode.timeout(const Duration(seconds: 5)), 0); - final serverOutput = testServerOutput + final serverOutput = (await collector.output) .toString() .split(RegExp('\r?\n')) .where((v) => v.isNotEmpty); @@ -95,23 +85,31 @@ void main() async { final debugSymbols = uploadedDebugSymbols(serverOutput).keys; switch (platform) { - case 'android': + case 'apk': + case 'appbundle': expect( debugSymbols, containsAll([ 'app.android-arm.symbols', 'app.android-arm64.symbols', 'app.android-x64.symbols', - 'app.so', 'libflutter.so' ])); + expect(debugSymbols, anyElement(matches(RegExp('^(lib)?app.so\$')))); break; case 'ios': + case 'ipa': expect(debugSymbols, containsAll(['App', 'Flutter', 'Runner'])); break; + case 'ios-framework': + expect(debugSymbols, containsAll(['App', 'Flutter'])); + break; case 'macos': expect(debugSymbols, containsAll(['App', 'FlutterMacOS', appName])); break; + case 'macos-framework': + expect(debugSymbols, containsAll(['App', 'FlutterMacOS'])); + break; case 'windows': expect( debugSymbols, @@ -157,22 +155,15 @@ Future> _exec(String executable, List arguments, runInShell: true, ); - // forward standard streams - unawaited(stderr.addStream(process.stderr)); - - final output = StringBuffer(); - final outputFuture = process.stdout.forEach((data) { - stdout.add(data); - output.write(utf8.decode(data)); - }); + final collector = _ProcessStreamCollector(process); int exitCode = await process.exitCode; - await outputFuture; if (exitCode != 0) { throw Exception( "$executable ${arguments.join(' ')} failed with exit code $exitCode"); } + final output = await collector.output; return output.toString().split(RegExp('\r?\n')); } @@ -192,13 +183,8 @@ Future _prepareTestApp(Directory tempDir, String platform) async { final pubspecFile = File('${appDir.path}/pubspec.yaml'); final buildArgs = [ - if (platform == 'ios') - 'ipa' - else if (platform == 'android') - 'apk' - else - platform, - if (platform == 'ios') '--no-codesign', + platform, + if (['ipa', 'ios'].contains(platform)) '--no-codesign', if (platform == 'web') '--source-maps', if (platform != 'web') '--split-debug-info=symbols', if (platform != 'web') '--obfuscate' @@ -257,3 +243,22 @@ final _serverPort = socket.close(); return port; }); + +class _ProcessStreamCollector { + final _output = StringBuffer(); + final _futures = []; + + _ProcessStreamCollector(Process process) { + _futures.add(process.stderr.forEach((_listen))); + _futures.add(process.stdout.forEach((_listen))); + } + + void _listen(List data) { + final str = utf8.decode(data); + print(str.trim()); + _output.write(str); + } + + Future get output => + Future.wait(_futures).then((_) => _output.toString()); +} diff --git a/test/plugin_test.dart b/test/plugin_test.dart index f8a2f52..6ff8078 100644 --- a/test/plugin_test.dart +++ b/test/plugin_test.dart @@ -24,7 +24,7 @@ void main() { const cli = MockCLI.name; const orgAndProject = '--org o --project p'; const name = 'name'; - const buildDir = '/subdir'; + const buildDir = 'build'; /// File types from which we can read configs. const fileTypes = [ @@ -37,7 +37,7 @@ void main() { pm = MockProcessManager(); injector.registerSingleton(() => pm, override: true); fs = MemoryFileSystem.test(); - fs.currentDirectory = fs.directory(buildDir)..createSync(); + fs.directory('$buildDir/app/outputs').createSync(recursive: true); injector.registerSingleton(() => fs, override: true); injector.registerSingleton(() => MockCLI(), override: true); configWriter = ConfigWriter(fs, name); @@ -82,9 +82,9 @@ void main() { final args = '$commonArgs --log-level debug'; expect(commandLog, [ - '$cli $args debug-files upload $orgAndProject --include-sources $buildDir', + '$cli $args debug-files upload $orgAndProject --include-sources $buildDir/app/outputs', '$cli $args releases $orgAndProject new $release', - '$cli $args releases $orgAndProject files $release upload-sourcemaps $buildDir/build/web --ext map --ext js', + '$cli $args releases $orgAndProject files $release upload-sourcemaps $buildDir/web --ext map --ext js', '$cli $args releases $orgAndProject files $release upload-sourcemaps $buildDir --ext dart', '$cli $args releases $orgAndProject set-commits $release --auto --ignore-missing', '$cli $args releases $orgAndProject finalize $release' @@ -108,7 +108,7 @@ void main() { const release = '$name@$version'; expect(commandLog, [ - '$cli $commonArgs debug-files upload $orgAndProject $buildDir', + '$cli $commonArgs debug-files upload $orgAndProject $buildDir/app/outputs', '$cli $commonArgs releases $orgAndProject new $release', '$cli $commonArgs releases $orgAndProject set-commits $release --auto', '$cli $commonArgs releases $orgAndProject finalize $release' @@ -129,7 +129,7 @@ void main() { const release = '$name@$version'; expect(commandLog, [ - '$customCliPath $commonArgs debug-files upload $orgAndProject $buildDir', + '$customCliPath $commonArgs debug-files upload $orgAndProject $buildDir/app/outputs', '$customCliPath $commonArgs releases $orgAndProject new $release', '$customCliPath $commonArgs releases $orgAndProject set-commits $release --auto', '$customCliPath $commonArgs releases $orgAndProject finalize $release' @@ -157,7 +157,7 @@ void main() { const release = '$name@$version'; expect(commandLog, [ - '$cli $commonArgs debug-files upload $orgAndProject $buildDir', + '$cli $commonArgs debug-files upload $orgAndProject $buildDir/app/outputs', '$cli $commonArgs releases $orgAndProject new $release', '$cli $commonArgs releases $orgAndProject set-commits $release $expectedArgs', '$cli $commonArgs releases $orgAndProject finalize $release' @@ -172,7 +172,7 @@ void main() { const release = '$name@$version'; expect(commandLog, [ - '$cli $commonArgs debug-files upload $orgAndProject $buildDir', + '$cli $commonArgs debug-files upload $orgAndProject $buildDir/app/outputs', '$cli $commonArgs releases $orgAndProject new $release', '$cli $commonArgs releases $orgAndProject finalize $release' ]); @@ -193,7 +193,7 @@ void main() { final args = commonArgs; expect(commandLog, [ '$cli $args releases $orgAndProject new $release', - '$cli $args releases $orgAndProject files $release upload-sourcemaps $buildDir/build/web --ext map --ext js', + '$cli $args releases $orgAndProject files $release upload-sourcemaps $buildDir/web --ext map --ext js', '$cli $args releases $orgAndProject set-commits $release --auto', '$cli $args releases $orgAndProject finalize $release' ]); @@ -213,7 +213,7 @@ void main() { final args = commonArgs; expect(commandLog, [ '$cli $args releases $orgAndProject new $configRelease', - '$cli $args releases $orgAndProject files $configRelease upload-sourcemaps $buildDir/build/web --ext map --ext js', + '$cli $args releases $orgAndProject files $configRelease upload-sourcemaps $buildDir/web --ext map --ext js', '$cli $args releases $orgAndProject set-commits $configRelease --auto', '$cli $args releases $orgAndProject finalize $configRelease' ]); @@ -235,7 +235,7 @@ void main() { final args = commonArgs; expect(commandLog, [ '$cli $args releases $orgAndProject new $release', - '$cli $args releases $orgAndProject files $release upload-sourcemaps $buildDir/build/web --ext map --ext js --dist $build', + '$cli $args releases $orgAndProject files $release upload-sourcemaps $buildDir/web --ext map --ext js --dist $build', '$cli $args releases $orgAndProject set-commits $release --auto', '$cli $args releases $orgAndProject finalize $release' ]); @@ -256,7 +256,7 @@ void main() { final args = commonArgs; expect(commandLog, [ '$cli $args releases $orgAndProject new $configRelease', - '$cli $args releases $orgAndProject files $configRelease upload-sourcemaps $buildDir/build/web --ext map --ext js --dist $build', + '$cli $args releases $orgAndProject files $configRelease upload-sourcemaps $buildDir/web --ext map --ext js --dist $build', '$cli $args releases $orgAndProject set-commits $configRelease --auto', '$cli $args releases $orgAndProject finalize $configRelease' ]); @@ -277,7 +277,7 @@ void main() { final args = commonArgs; expect(commandLog, [ '$cli $args releases $orgAndProject new $release', - '$cli $args releases $orgAndProject files $release upload-sourcemaps $buildDir/build/web --ext map --ext js --dist $configDist', + '$cli $args releases $orgAndProject files $release upload-sourcemaps $buildDir/web --ext map --ext js --dist $configDist', '$cli $args releases $orgAndProject set-commits $release --auto', '$cli $args releases $orgAndProject finalize $release' ]); @@ -301,7 +301,7 @@ void main() { final args = commonArgs; expect(commandLog, [ '$cli $args releases $orgAndProject new $release', - '$cli $args releases $orgAndProject files $release upload-sourcemaps $buildDir/build/web --ext map --ext js --dist $configDist', + '$cli $args releases $orgAndProject files $release upload-sourcemaps $buildDir/web --ext map --ext js --dist $configDist', '$cli $args releases $orgAndProject set-commits $release --auto', '$cli $args releases $orgAndProject finalize $release' ]); @@ -323,7 +323,7 @@ void main() { final args = commonArgs; expect(commandLog, [ '$cli $args releases $orgAndProject new $configRelease', - '$cli $args releases $orgAndProject files $configRelease upload-sourcemaps $buildDir/build/web --ext map --ext js --dist $configDist', + '$cli $args releases $orgAndProject files $configRelease upload-sourcemaps $buildDir/web --ext map --ext js --dist $configDist', '$cli $args releases $orgAndProject set-commits $configRelease --auto', '$cli $args releases $orgAndProject finalize $configRelease' ]); @@ -348,7 +348,7 @@ void main() { final args = commonArgs; expect(commandLog, [ '$cli $args releases $orgAndProject new $configRelease', - '$cli $args releases $orgAndProject files $configRelease upload-sourcemaps $buildDir/build/web --ext map --ext js --dist $configDist --url-prefix ~/app/', + '$cli $args releases $orgAndProject files $configRelease upload-sourcemaps $buildDir/web --ext map --ext js --dist $configDist --url-prefix ~/app/', '$cli $args releases $orgAndProject set-commits $configRelease --auto', '$cli $args releases $orgAndProject finalize $configRelease' ]);