run method

Future<void> run()

Implementation

Future<void> run() async {
  final rootSymbolsPath = join(root, 'sentry.properties');
  if (!await File(rootSymbolsPath).exists()) {
    File(rootSymbolsPath).create(recursive: true);
  }
  final contents = await File(symbolsPath).readAsLines();
  for (var i = 0; i < contents.length; i++) {
    final content = contents[i];
    if (content.startsWith('release')) {
      contents[i] = 'release=$version';
    } else if (content.startsWith('dist')) {
      contents[i] = 'dist=$build';
    }
  }

  await File(rootSymbolsPath).writeAsString(contents.join('\n'));
  await runCommand(root, 'flutter packages pub run sentry_dart_plugin');
}