Skip to content

Commit e8437a1

Browse files
always attempt to download platform sdk
1 parent 48e708c commit e8437a1

3 files changed

Lines changed: 8 additions & 30 deletions

File tree

dist/index.js

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -58609,10 +58609,7 @@ async function GetProjectDetails(credential, xcodeVersion) {
5860958609
core.info(`Platform: ${platform}`);
5861058610
if (platform !== 'macOS') {
5861158611
const platformSdkVersion = await getPlatformSdkVersion(buildSettings);
58612-
const sdkInfo = await getSdkInfo(platform, platformSdkVersion);
58613-
if (!sdkInfo) {
58614-
await downloadPlatformAndSdk(platform, platformSdkVersion);
58615-
}
58612+
await downloadPlatformSdk(platform, platformSdkVersion);
5861658613
}
5861758614
const configuration = core.getInput('configuration') || 'Release';
5861858615
core.info(`Configuration: ${configuration}`);
@@ -58837,15 +58834,8 @@ async function getSdkInfo(platform, version) {
5883758834
core.info(`Found SDK:\n${sdk ? JSON.stringify(sdk, null, 2) : ''}`);
5883858835
return sdk || null;
5883958836
}
58840-
async function downloadPlatformAndSdk(platform, version) {
58841-
const downloadDir = `${process.env.RUNNER_TEMP}/xcodes/${platform}-${version}`;
58842-
await execXcodeBuild(['-downloadPlatform', platform, '-exportPath', downloadDir, '-buildVersion', version]);
58843-
const dmgPaths = await (0, utilities_1.getPathsWithGlob)(`${downloadDir}/**/*.dmg`);
58844-
core.info(`Downloaded DMG paths:\n${dmgPaths.join('\n')}`);
58845-
for (const dmgPath of dmgPaths) {
58846-
await fs.promises.access(dmgPath, fs.constants.R_OK);
58847-
await execXcodeBuild(['-importPlatform', dmgPath]);
58848-
}
58837+
async function downloadPlatformSdk(platform, version) {
58838+
await execXcodeBuild(['-downloadPlatform', platform, '-buildVersion', version]);
5884958839
}
5885058840
async function getProjectScheme(projectPath) {
5885158841
let scheme = core.getInput('scheme');

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/xcode.ts

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -161,11 +161,8 @@ export async function GetProjectDetails(credential: AppleCredential, xcodeVersio
161161

162162
if (platform !== 'macOS') {
163163
const platformSdkVersion = await getPlatformSdkVersion(buildSettings);
164-
const sdkInfo = await getSdkInfo(platform, platformSdkVersion);
165-
166-
if (!sdkInfo) {
167-
await downloadPlatformAndSdk(platform, platformSdkVersion);
168-
}
164+
// await getSdkInfo(platform, platformSdkVersion);
165+
await downloadPlatformSdk(platform, platformSdkVersion);
169166
}
170167

171168
const configuration = core.getInput('configuration') || 'Release';
@@ -452,17 +449,8 @@ async function getSdkInfo(platform: string, version: string): Promise<SdkInfo |
452449
return sdk || null;
453450
}
454451

455-
async function downloadPlatformAndSdk(platform: string, version: string): Promise<void> {
456-
const downloadDir = `${process.env.RUNNER_TEMP}/xcodes/${platform}-${version}`;
457-
await execXcodeBuild(['-downloadPlatform', platform, '-exportPath', downloadDir, '-buildVersion', version]);
458-
const dmgPaths = await getPathsWithGlob(`${downloadDir}/**/*.dmg`);
459-
460-
core.info(`Downloaded DMG paths:\n${dmgPaths.join('\n')}`);
461-
462-
for (const dmgPath of dmgPaths) {
463-
await fs.promises.access(dmgPath, fs.constants.R_OK);
464-
await execXcodeBuild(['-importPlatform', dmgPath]);
465-
}
452+
async function downloadPlatformSdk(platform: string, version: string): Promise<void> {
453+
await execXcodeBuild(['-downloadPlatform', platform, '-buildVersion', version]);
466454
}
467455

468456
async function getProjectScheme(projectPath: string): Promise<string> {

0 commit comments

Comments
 (0)