uploadToFirebaseByCli method
Implementation
Future<void> uploadToFirebaseByCli(
File buildFile, {
required String appId,
String releaseNotes = '',
List<String> groups = const [],
}) async {
final command =
StringBuffer('firebase appdistribution:distribute ${buildFile.path} --app $appId');
if (groups.isNotEmpty) {
command
..write(' --groups "')
..write(groups.join(', '))
..write('"');
}
if (releaseNotes.isNotEmpty) {
command
..write(' --release-notes "')
..write(releaseNotes.replaceAll('"', '\'').split('\n').join('\\n'))
..write('"');
}
await _shell.singleRun(command.toString());
}