@@ -58369,8 +58369,10 @@ exports.log = log;
5836958369exports.DeepEqual = DeepEqual;
5837058370exports.matchRegexPattern = matchRegexPattern;
5837158371exports.getFirstPathWithGlob = getFirstPathWithGlob;
58372+ exports.getFileContents = getFileContents;
5837258373const core = __nccwpck_require__(2186);
5837358374const glob = __nccwpck_require__(8090);
58375+ const fs = __nccwpck_require__(7147);
5837458376function log(message, type = 'info') {
5837558377 if (type == 'info' && !core.isDebug()) {
5837658378 return;
@@ -58445,6 +58447,24 @@ async function getFirstPathWithGlob(globPattern) {
5844558447 }
5844658448 return files[0];
5844758449}
58450+ async function getFileContents(filePath, printContent = true) {
58451+ let fileContents = '';
58452+ if (printContent) {
58453+ core.startGroup(`${filePath} content:`);
58454+ }
58455+ const fileHandle = await fs.promises.open(filePath, fs.constants.O_RDONLY);
58456+ try {
58457+ fileContents = await fs.promises.readFile(fileHandle, 'utf8');
58458+ }
58459+ finally {
58460+ await fileHandle.close();
58461+ if (printContent) {
58462+ core.info(fileContents);
58463+ core.endGroup();
58464+ }
58465+ }
58466+ return fileContents;
58467+ }
5844858468
5844958469
5845058470/***/ }),
@@ -58608,14 +58628,7 @@ async function GetProjectDetails(credential, xcodeVersion) {
5860858628 infoPlistPath = `${projectDirectory}/Info.plist`;
5860958629 }
5861058630 core.info(`Info.plist path: ${infoPlistPath}`);
58611- const infoPlistHandle = await fs.promises.open(infoPlistPath, fs.constants.O_RDONLY);
58612- let infoPlistContent;
58613- try {
58614- infoPlistContent = await fs.promises.readFile(infoPlistHandle, 'utf8');
58615- }
58616- finally {
58617- await infoPlistHandle.close();
58618- }
58631+ let infoPlistContent = await (0, utilities_1.getFileContents)(infoPlistPath, false);
5861958632 const infoPlist = plist.parse(infoPlistContent);
5862058633 let cFBundleShortVersionString = infoPlist['CFBundleShortVersionString'];
5862158634 if (cFBundleShortVersionString) {
@@ -58652,6 +58665,9 @@ async function GetProjectDetails(credential, xcodeVersion) {
5865258665 else {
5865358666 projectRef.entitlementsPath = entitlementsPath;
5865458667 }
58668+ if (projectRef.entitlementsPath) {
58669+ await (0, utilities_1.getFileContents)(projectRef.entitlementsPath);
58670+ }
5865558671 if (projectRef.isAppStoreUpload()) {
5865658672 projectRef.appId = await (0, AppStoreConnectClient_1.GetAppId)(projectRef);
5865758673 if (projectRef.autoIncrementBuildNumber) {
@@ -58743,14 +58759,7 @@ async function GetProjectDetails(credential, xcodeVersion) {
5874358759 }
5874458760 }
5874558761 }
58746- const plistHandle = await fs.promises.open(infoPlistPath, fs.constants.O_RDONLY);
58747- try {
58748- infoPlistContent = await fs.promises.readFile(plistHandle, 'utf8');
58749- }
58750- finally {
58751- await plistHandle.close();
58752- }
58753- core.info(`------- Info.plist content: -------\n${infoPlistContent}\n-----------------------------------`);
58762+ infoPlistContent = await (0, utilities_1.getFileContents)(infoPlistPath);
5875458763 return projectRef;
5875558764}
5875658765async function checkSimulatorsAvailable(platform) {
@@ -58952,16 +58961,7 @@ async function getExportOptions(projectRef) {
5895258961 if (!exportOptionsPath) {
5895358962 throw new Error(`Invalid path for export-option-plist: ${exportOptionsPath}`);
5895458963 }
58955- const exportOptionsHandle = await fs.promises.open(exportOptionsPath, fs.constants.O_RDONLY);
58956- try {
58957- const exportOptionContent = await fs.promises.readFile(exportOptionsHandle, 'utf8');
58958- core.info(`----- Export options content: -----\n${exportOptionContent}\n-----------------------------------`);
58959- const exportOptions = plist.parse(exportOptionContent);
58960- projectRef.exportOption = exportOptions['method'];
58961- }
58962- finally {
58963- await exportOptionsHandle.close();
58964- }
58964+ await (0, utilities_1.getFileContents)(exportOptionsPath);
5896558965 projectRef.exportOptionsPath = exportOptionsPath;
5896658966}
5896758967async function getDefaultEntitlementsMacOS(projectRef) {
@@ -58981,7 +58981,6 @@ async function getDefaultEntitlementsMacOS(projectRef) {
5898158981 case 'app-store-connect':
5898258982 defaultEntitlements = {
5898358983 'com.apple.security.app-sandbox': true,
58984- 'com.apple.security.files.user-selected.read-only': true,
5898558984 };
5898658985 break;
5898758986 default:
@@ -59029,16 +59028,6 @@ async function ArchiveXcodeProject(projectRef) {
5902959028 archiveArgs.push(`AD_HOC_CODE_SIGNING_ALLOWED=YES`, `-allowProvisioningUpdates`);
5903059029 }
5903159030 if (entitlementsPath) {
59032- core.debug(`Entitlements path: ${entitlementsPath}`);
59033- const entitlementsHandle = await fs.promises.open(entitlementsPath, fs.constants.O_RDONLY);
59034- try {
59035- const entitlementsContent = await fs.promises.readFile(entitlementsHandle, 'utf8');
59036- core.startGroup(`----- Entitlements content: -----\n${entitlementsContent}\n-----------------------------------`);
59037- }
59038- finally {
59039- await entitlementsHandle.close();
59040- core.endGroup();
59041- }
5904259031 archiveArgs.push(`CODE_SIGN_ENTITLEMENTS=${entitlementsPath}`);
5904359032 }
5904459033 if (platform === 'iOS') {
0 commit comments