parent
89c78505df
commit
1def7a260c
3 changed files with 5 additions and 12 deletions
|
|
@ -40,16 +40,11 @@ class BuildiOS extends Command {
|
|||
if (appID == null) {
|
||||
throw Exception('Can not find App Identifier.');
|
||||
}
|
||||
var teamID = data.teamID;
|
||||
if(teamID == null) {
|
||||
throw Exception('Can not find Apple Store Team ID');
|
||||
}
|
||||
if (data.apiKeyPath == null) {
|
||||
throw Exception(
|
||||
'If autoVersionNumber = true then must set apiKeyPath.');
|
||||
}
|
||||
var apiKeyPath = data.apiKeyPath!;
|
||||
var fastFile = await initializeFastlane(data.workspace!, apiKeyPath, appID);
|
||||
var fastFile = await initializeFastlane(data.workspace!, data.apiKeyPath!, appID);
|
||||
var fastlaneContent = fastFile.readAsStringSync();
|
||||
|
||||
//Find PREPARE_FOR_SUBMISSION state Version
|
||||
|
|
@ -87,13 +82,14 @@ class BuildiOS extends Command {
|
|||
fastFile.writeAsStringSync(fastlaneContent, flush: true);
|
||||
shell = StringBuffer();
|
||||
shell.write('cd ${data.workspace}/fastlane');
|
||||
shell.write(' && fastlane run latest_testflight_build_number app_identifier:$appID version:$version platform:ios api_key_path:"$apiKeyPath" team_id:"$teamID"');
|
||||
shell.write(' && fastlane latest_build_number');
|
||||
process = await ProcessExecutor.run(shell);
|
||||
arr = process.stdout.toString().split('\n');
|
||||
for (var item in arr) {
|
||||
if (item.contains(result)) {
|
||||
targetBuildNumber = item.substring(item.indexOf(result) + result.length).trim();
|
||||
print('Build Number: $targetBuildNumber');
|
||||
var json =
|
||||
jsonDecode(item.substring(item.indexOf(result) + result.length));
|
||||
targetBuildNumber = json['latest_build_number'];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -226,7 +226,6 @@ class DataBuildiOS extends DataParam {
|
|||
late String? version; //존재시 autoBuildNumber = false
|
||||
late String? buildNumber; //존재시 autoBuildNumber = false
|
||||
late bool? autoBuildNumber = false;
|
||||
late String? teamID; //Apple store team ID
|
||||
late String? apiKeyPath; //autoVersionNumber 사용시 필수
|
||||
|
||||
//set
|
||||
|
|
|
|||
|
|
@ -402,7 +402,6 @@ DataBuildiOS _$DataBuildiOSFromJson(Map<String, dynamic> json) => DataBuildiOS()
|
|||
..version = json['version'] as String?
|
||||
..buildNumber = json['buildNumber'] as String?
|
||||
..autoBuildNumber = json['autoBuildNumber'] as bool?
|
||||
..teamID = json['teamID'] as String?
|
||||
..apiKeyPath = json['apiKeyPath'] as String?
|
||||
..setVersion = json['setVersion'] as String?
|
||||
..setBuildNumber = json['setBuildNumber'] as String?
|
||||
|
|
@ -428,7 +427,6 @@ Map<String, dynamic> _$DataBuildiOSToJson(DataBuildiOS instance) =>
|
|||
'version': instance.version,
|
||||
'buildNumber': instance.buildNumber,
|
||||
'autoBuildNumber': instance.autoBuildNumber,
|
||||
'teamID': instance.teamID,
|
||||
'apiKeyPath': instance.apiKeyPath,
|
||||
'setVersion': instance.setVersion,
|
||||
'setBuildNumber': instance.setBuildNumber,
|
||||
|
|
|
|||
Loading…
Reference in a new issue