@@ -4803,13 +4803,28 @@ var import_graphql = __nccwpck_require__(8467);
48034803var import_auth_token = __nccwpck_require__(334);
48044804
48054805// pkg/dist-src/version.js
4806- var VERSION = "5.2.1 ";
4806+ var VERSION = "5.2.2 ";
48074807
48084808// pkg/dist-src/index.js
48094809var noop = () => {
48104810};
48114811var consoleWarn = console.warn.bind(console);
48124812var consoleError = console.error.bind(console);
4813+ function createLogger(logger = {}) {
4814+ if (typeof logger.debug !== "function") {
4815+ logger.debug = noop;
4816+ }
4817+ if (typeof logger.info !== "function") {
4818+ logger.info = noop;
4819+ }
4820+ if (typeof logger.warn !== "function") {
4821+ logger.warn = consoleWarn;
4822+ }
4823+ if (typeof logger.error !== "function") {
4824+ logger.error = consoleError;
4825+ }
4826+ return logger;
4827+ }
48134828var userAgentTrail = `octokit-core.js/${VERSION} ${(0, import_universal_user_agent.getUserAgent)()}`;
48144829var Octokit = class {
48154830 static {
@@ -4883,15 +4898,7 @@ var Octokit = class {
48834898 }
48844899 this.request = import_request.request.defaults(requestDefaults);
48854900 this.graphql = (0, import_graphql.withCustomRequest)(this.request).defaults(requestDefaults);
4886- this.log = Object.assign(
4887- {
4888- debug: noop,
4889- info: noop,
4890- warn: consoleWarn,
4891- error: consoleError
4892- },
4893- options.log
4894- );
4901+ this.log = createLogger(options.log);
48954902 this.hook = hook;
48964903 if (!options.authStrategy) {
48974904 if (!options.auth) {
@@ -58286,7 +58293,7 @@ async function unlockTemporaryKeychain(keychainPath, tempCredential) {
5828658293Object.defineProperty(exports, "__esModule", ({ value: true }));
5828758294exports.XcodeProject = void 0;
5828858295class XcodeProject {
58289- constructor(projectPath, projectName, platform, destination, bundleId, projectDirectory, versionString, bundleVersion, scheme, credential, xcodeVersion) {
58296+ constructor(projectPath, projectName, platform, destination, bundleId, projectDirectory, versionString, bundleVersion, scheme, credential, xcodeVersion, derivedDataPath ) {
5829058297 this.projectPath = projectPath;
5829158298 this.projectName = projectName;
5829258299 this.platform = platform;
@@ -58299,6 +58306,7 @@ class XcodeProject {
5829958306 this.credential = credential;
5830058307 this.xcodeVersion = xcodeVersion;
5830158308 this.isSteamBuild = false;
58309+ this.derivedDataPath = derivedDataPath;
5830258310 }
5830358311 isAppStoreUpload() {
5830458312 return this.exportOption === 'app-store' || this.exportOption === 'app-store-connect';
@@ -58317,7 +58325,9 @@ exports.XcodeProject = XcodeProject;
5831758325Object.defineProperty(exports, "__esModule", ({ value: true }));
5831858326exports.log = log;
5831958327exports.DeepEqual = DeepEqual;
58328+ exports.SetupCCache = SetupCCache;
5832058329const core = __nccwpck_require__(2186);
58330+ const exec_1 = __nccwpck_require__(1514);
5832158331function log(message, type = 'info') {
5832258332 if (type == 'info' && !core.isDebug()) {
5832358333 return;
@@ -58376,6 +58386,19 @@ function DeepEqual(a, b) {
5837658386 }
5837758387 return true;
5837858388}
58389+ async function SetupCCache() {
58390+ try {
58391+ await (0, exec_1.exec)('which', ['ccache'], {
58392+ failOnStdErr: true
58393+ });
58394+ }
58395+ catch (_a) {
58396+ await (0, exec_1.exec)('brew', ['install', 'ccache']);
58397+ }
58398+ process.env.CC = 'ccache clang';
58399+ process.env.CXX = 'ccache clang++';
58400+ core.info('ccache is enabled for Xcode builds.');
58401+ }
5837958402
5838058403
5838158404/***/ }),
@@ -58490,7 +58513,9 @@ async function GetProjectDetails(credential, xcodeVersion) {
5849058513 core.info(`CFBundleShortVersionString: ${cFBundleShortVersionString}`);
5849158514 const cFBundleVersion = infoPlist['CFBundleVersion'];
5849258515 core.info(`CFBundleVersion: ${cFBundleVersion}`);
58493- const projectRef = new XcodeProject_1.XcodeProject(projectPath, projectName, platform, destination, bundleId, projectDirectory, cFBundleShortVersionString, cFBundleVersion, scheme, credential, xcodeVersion);
58516+ const derivedDataPathInput = core.getInput('derived-data-path') || path.join(projectDirectory, 'DerivedData');
58517+ core.debug(`DerivedData path input: ${derivedDataPathInput}`);
58518+ const projectRef = new XcodeProject_1.XcodeProject(projectPath, projectName, platform, destination, bundleId, projectDirectory, cFBundleShortVersionString, cFBundleVersion, scheme, credential, xcodeVersion, derivedDataPathInput);
5849458519 projectRef.autoIncrementBuildNumber = core.getInput('auto-increment-build-number') === 'true';
5849558520 await getExportOptions(projectRef);
5849658521 if (projectRef.isAppStoreUpload()) {
@@ -58745,6 +58770,7 @@ async function ArchiveXcodeProject(projectRef) {
5874558770 '-destination', projectRef.destination,
5874658771 '-configuration', configuration,
5874758772 '-archivePath', archivePath,
58773+ `-derivedDataPath`, projectRef.derivedDataPath,
5874858774 `-authenticationKeyID`, projectRef.credential.appStoreConnectKeyId,
5874958775 `-authenticationKeyPath`, projectRef.credential.appStoreConnectKeyPath,
5875058776 `-authenticationKeyIssuerID`, projectRef.credential.appStoreConnectIssuerId
@@ -58809,6 +58835,7 @@ async function ExportXcodeArchive(projectRef) {
5880958835 '-archivePath', archivePath,
5881058836 '-exportPath', projectRef.exportPath,
5881158837 '-exportOptionsPlist', exportOptionsPath,
58838+ `-derivedDataPath`, projectRef.derivedDataPath,
5881258839 `-authenticationKeyID`, projectRef.credential.appStoreConnectKeyId,
5881358840 `-authenticationKeyPath`, projectRef.credential.appStoreConnectKeyPath,
5881458841 `-authenticationKeyIssuerID`, projectRef.credential.appStoreConnectIssuerId
@@ -61481,6 +61508,7 @@ const exec = __nccwpck_require__(1514);
6148161508const xcode_1 = __nccwpck_require__(9157);
6148261509const AppleCredential_1 = __nccwpck_require__(4199);
6148361510const semver = __nccwpck_require__(1383);
61511+ const utilities_1 = __nccwpck_require__(5739);
6148461512const IS_POST = !!core.getState('isPost');
6148561513const main = async () => {
6148661514 try {
@@ -61562,6 +61590,7 @@ const main = async () => {
6156261590 if (xcodeVersionString !== selectedXcodeVersionString) {
6156361591 throw new Error(`Selected Xcode version ${selectedXcodeVersionString} does not match requested version ${xcodeVersionString}!`);
6156461592 }
61593+ await (0, utilities_1.SetupCCache)();
6156561594 let projectRef = await (0, xcode_1.GetProjectDetails)(credential, semver.coerce(xcodeVersionString));
6156661595 projectRef = await (0, xcode_1.ArchiveXcodeProject)(projectRef);
6156761596 projectRef = await (0, xcode_1.ExportXcodeArchive)(projectRef);
0 commit comments