ArchiveiOS xcodeproj 지원 추가

BuildiOS와 동일하게 xcworkspaceFilePath, xcodeProjectFilePath 중
하나를 선택하여 사용할 수 있도록 수정.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
toki 2026-03-03 15:30:13 +09:00
parent ebe777a70d
commit 140ec88f6a
3 changed files with 20 additions and 4 deletions

View file

@ -516,13 +516,26 @@ class ArchiveiOS extends Command {
@override
Future execute(DataCommand command) async {
var data = DataArchiveiOS.fromJson(getParam(command));
var workspacePath = Command.getPathNormal(data.xcworkspaceFilePath);
var xcodeProjectPath =
data.xcworkspaceFilePath ?? data.xcodeProjectFilePath;
if (xcodeProjectPath == null) {
throw Exception(
'"xcodeProjectFilePath" or "xcworkspaceFilePath" must set at least one.');
}
var projectPath = Command.getPathNormal(xcodeProjectPath);
var archivePath = Command.getPathNormal(data.archivePath);
var destination = data.destination ?? "'generic/platform=iOS'";
var project = '';
if (data.xcworkspaceFilePath != null) {
project = '-workspace $projectPath';
} else {
project = '-project $projectPath';
}
var shell = StringBuffer();
shell.write(
'xcodebuild -workspace $workspacePath -scheme ${data.scheme} -destination $destination -archivePath $archivePath archive');
'xcodebuild $project -scheme ${data.scheme} -destination $destination -archivePath $archivePath archive');
var process = await ProcessExecutor.start(shell,
workspace: workspace,

View file

@ -310,7 +310,8 @@ class DataNotarize extends DataParam {
class DataArchiveiOS extends DataParam {
DataArchiveiOS();
late String xcworkspaceFilePath;
late String? xcworkspaceFilePath;
late String? xcodeProjectFilePath;
late String scheme;
late String archivePath;
late String? destination;

View file

@ -563,7 +563,8 @@ DataArchiveiOS _$DataArchiveiOSFromJson(Map<String, dynamic> json) =>
..setResult = json['setResult'] as String?
..setExitCode = json['setExitCode'] as String?
..showPrint = json['showPrint'] as bool?
..xcworkspaceFilePath = json['xcworkspaceFilePath'] as String
..xcworkspaceFilePath = json['xcworkspaceFilePath'] as String?
..xcodeProjectFilePath = json['xcodeProjectFilePath'] as String?
..scheme = json['scheme'] as String
..archivePath = json['archivePath'] as String
..destination = json['destination'] as String?;
@ -576,6 +577,7 @@ Map<String, dynamic> _$DataArchiveiOSToJson(DataArchiveiOS instance) =>
'setExitCode': instance.setExitCode,
'showPrint': instance.showPrint,
'xcworkspaceFilePath': instance.xcworkspaceFilePath,
'xcodeProjectFilePath': instance.xcodeProjectFilePath,
'scheme': instance.scheme,
'archivePath': instance.archivePath,
'destination': instance.destination,