apple build --platform macos --tauri: Mac App Store build of a Tauri app (sandbox entitlements, profile, productbuild pkg, path-free, checks); apple upload accepts the pkg
This commit is contained in:
parent
29a9683ab7
commit
cd6667e0b6
8 changed files with 726 additions and 22 deletions
|
|
@ -187,13 +187,13 @@ export function ipaVersionProblem(ipaVersion: string, wanted: string | null | un
|
|||
export const UPLOAD_DONE = new Set(['COMPLETE', 'FAILED']);
|
||||
|
||||
/** Requests of an App Store Connect API build upload (Build Uploads, API 4.1): the upload, then the file reservation. */
|
||||
export function buildUploadReqs(appId: string, info: IpaInfo, fileName: string, fileSize: number) {
|
||||
export function buildUploadReqs(appId: string, info: IpaInfo, fileName: string, fileSize: number, platform: 'IOS' | 'MAC_OS' = 'IOS') {
|
||||
return {
|
||||
upload: { method: 'POST' as const, path: '/v1/buildUploads', note: `build ${info.build} (${info.version})`,
|
||||
body: { data: { type: 'buildUploads', attributes: { cfBundleShortVersionString: info.version, cfBundleVersion: info.build, platform: 'IOS' },
|
||||
body: { data: { type: 'buildUploads', attributes: { cfBundleShortVersionString: info.version, cfBundleVersion: info.build, platform },
|
||||
relationships: { app: { data: { type: 'apps', id: appId } } } } } },
|
||||
file: (uploadId: string) => ({ method: 'POST' as const, path: '/v1/buildUploadFiles', note: `${fileName} (${(fileSize / 1048576).toFixed(1)} MB)`,
|
||||
body: { data: { type: 'buildUploadFiles', attributes: { assetType: 'ASSET', fileName, fileSize, uti: 'com.apple.ipa' },
|
||||
body: { data: { type: 'buildUploadFiles', attributes: { assetType: 'ASSET', fileName, fileSize, uti: platform === 'MAC_OS' ? 'com.apple.pkg' : 'com.apple.ipa' },
|
||||
relationships: { buildUpload: { data: { type: 'buildUploads', id: uploadId } } } } } }),
|
||||
commit: (fileId: string, md5: string) => ({ method: 'PATCH' as const, path: `/v1/buildUploadFiles/${fileId}`, note: 'commit',
|
||||
body: { data: { type: 'buildUploadFiles', id: fileId, attributes: { uploaded: true, sourceFileChecksums: { file: { hash: md5, algorithm: 'MD5' } } } } } }),
|
||||
|
|
@ -202,7 +202,7 @@ export function buildUploadReqs(appId: string, info: IpaInfo, fileName: string,
|
|||
|
||||
/** altool upload (Xcode's command line uploader) with the API key. */
|
||||
export const altoolArgs = (ipa: string, auth: AscAuth): string[] =>
|
||||
['xcrun', 'altool', '--upload-package', ipa, '--api-key', auth.keyId, '--api-issuer', auth.issuerId, '--p8-file-path', auth.keyPath, '--output-format', 'json'];
|
||||
['xcrun', 'altool', '--upload-package', ipa, ...(ipa.endsWith('.pkg') ? ['--type', 'macos'] : []), '--api-key', auth.keyId, '--api-issuer', auth.issuerId, '--p8-file-path', auth.keyPath, '--output-format', 'json'];
|
||||
|
||||
/** Errors and warnings of a build upload's state (StateDetail: code, message). */
|
||||
export function uploadProblems(state: { errors?: { code?: string; message?: string; description?: string }[]; warnings?: { code?: string; message?: string; description?: string }[] } | undefined): { errors: string[]; warnings: string[] } {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue