upload method
Implementation
Future upload() async {
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);
}
String command = 'fastlane deploy apk:$apkPath';
if (log != null) {
command = '$command changelog:\'$log\'';
}
final result = await runCommand(join(root, 'android'), command)
.then((value) => value.first);
if (result.exitCode != 0) {
logger.log('上传失败!', status: LogStatus.error);
exit(result.exitCode);
}
}