upload method
Implementation
@override
Future upload(String root) async {
// build/ios/ipa/meta_winner_app.ipa
final yaml = loadYaml(File(join(root, 'pubspec.yaml')).readAsStringSync());
final ipaPath = join(root, 'build', 'ios', 'ipa', '${yaml['name']}.ipa');
if (!await File(ipaPath).exists()) {
logger.log('$ipaPath路径不存在!', status: LogStatus.error);
exit(2);
}
final result = await runCommand(
join(root, 'ios'), 'fastlane upload_testflight ipa:"$ipaPath"')
.then((value) => value.first);
if (result.exitCode != 0) {
logger.log('上传失败!', status: LogStatus.error);
exit(result.exitCode);
}
}