argumentsForCommand method
Builds the altool argument list for command.
command is either --validate-app or --upload-app. Both accept the
same authentication and metadata flags, which is why they share a builder.
Implementation
List<String> argumentsForCommand(String command) {
return [
"altool",
command,
// `--upload-package` replaces `-f` when uploading a package that was
// already prepared by a previous altool run.
if (uploadPackage != null && uploadPackage!.isNotEmpty) ...[
'--upload-package',
uploadPackage!,
] else ...[
'-f',
filePath,
],
if (username != null) ...['-u', username!],
if (password != null) ...['-p', password!],
if (apiKey != null) ...['--apiKey', apiKey!],
if (apiIssuer != null) ...['--apiIssuer', apiIssuer!],
if (appleId != null) ...['--apple-id', appleId!],
if (bundleVersion != null) ...['--bundle-version', bundleVersion!],
if (bundleShortVersionString != null) ...[
'--bundle-short-version-string',
bundleShortVersionString!,
],
if (ascPublicId != null) ...['--asc-public-id', ascPublicId!],
if (type != null) ...['-t', type!] else ...['--type', "iphoneos"],
if (bundleId != null) ...['--bundle-id', bundleId!],
if (productId != null) ...['--product-id', productId!],
if (sku != null) ...['--sku', sku!],
if (outputFormat != null) ...['--output-format', outputFormat!],
];
}