upload method
Implementation
@override
Future upload(String root) async {
// build/app/outputs/apk/release/app-release.apk
final apkPath = join(
root, 'build', 'app', 'outputs', 'apk', 'release', 'app-release.apk');
if (!await File(apkPath).exists()) {
logger.log('$apkPath路径不存在!', status: LogStatus.error);
exit(2);
}
final result = await runCommand(
join(root, 'android'), 'fastlane deploy apk:"$apkPath"')
.then((value) => value.first);
if (result.exitCode != 0) {
logger.log('上传失败!', status: LogStatus.error);
exit(result.exitCode);
}
}