Skip to content

Commit f0c3a3a

Browse files
disable logs
1 parent 205cb0c commit f0c3a3a

4 files changed

Lines changed: 9 additions & 36 deletions

File tree

dist/index.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57821,7 +57821,7 @@ async function CreateNewCertificate(project, certificateType, csrContent) {
5782157821
if (!response || !response.data) {
5782257822
throw new Error(`No certificate found!`);
5782357823
}
57824-
core.info(responseJson);
57824+
(0, utilities_1.log)(responseJson);
5782557825
return response.data;
5782657826
}
5782757827
async function GetCertificates(project, certificateType) {
@@ -57831,7 +57831,7 @@ async function GetCertificates(project, certificateType) {
5783157831
"filter[certificateType]": [certificateType]
5783257832
}
5783357833
};
57834-
core.info(`GET /certificates?${JSON.stringify(request.query)}`);
57834+
(0, utilities_1.log)(`GET /certificates?${JSON.stringify(request.query)}`);
5783557835
const { data: response, error } = await appStoreConnectClient.api.CertificatesService.certificatesGetCollection(request);
5783657836
if (error) {
5783757837
checkAuthError(error);
@@ -57841,7 +57841,7 @@ async function GetCertificates(project, certificateType) {
5784157841
if (!response || !response.data || response.data.length === 0) {
5784257842
return [];
5784357843
}
57844-
core.info(responseJson);
57844+
(0, utilities_1.log)(responseJson);
5784557845
return response.data.filter(certificate => {
5784657846
var _a;
5784757847
((_a = certificate.attributes) === null || _a === void 0 ? void 0 : _a.displayName) === 'Created via API';
@@ -57850,7 +57850,7 @@ async function GetCertificates(project, certificateType) {
5785057850
async function RevokeCertificate(certificateId, options) {
5785157851
appStoreConnectClient = new app_store_connect_api_1.AppStoreConnectClient(options);
5785257852
const request = { path: { id: certificateId } };
57853-
core.info(`DELETE /certificates/${certificateId}`);
57853+
(0, utilities_1.log)(`DELETE /certificates/${certificateId}`);
5785457854
const { error } = await appStoreConnectClient.api.CertificatesService.certificatesDeleteInstance(request);
5785557855
if (error) {
5785657856
checkAuthError(error);

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/AppStoreConnectClient.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,7 @@ export async function CreateNewCertificate(project: XcodeProject, certificateTyp
379379
if (!response || !response.data) {
380380
throw new Error(`No certificate found!`);
381381
}
382-
core.info(responseJson);
382+
log(responseJson);
383383
return response.data;
384384
}
385385

@@ -390,7 +390,7 @@ export async function GetCertificates(project: XcodeProject, certificateType: Ce
390390
"filter[certificateType]": [certificateType]
391391
}
392392
};
393-
core.info(`GET /certificates?${JSON.stringify(request.query)}`);
393+
log(`GET /certificates?${JSON.stringify(request.query)}`);
394394
const { data: response, error } = await appStoreConnectClient.api.CertificatesService.certificatesGetCollection(request);
395395
if (error) {
396396
checkAuthError(error);
@@ -400,7 +400,7 @@ export async function GetCertificates(project: XcodeProject, certificateType: Ce
400400
if (!response || !response.data || response.data.length === 0) {
401401
return [];
402402
}
403-
core.info(responseJson);
403+
log(responseJson);
404404
return response.data.filter(certificate => {
405405
certificate.attributes?.displayName === 'Created via API';
406406
});
@@ -409,7 +409,7 @@ export async function GetCertificates(project: XcodeProject, certificateType: Ce
409409
export async function RevokeCertificate(certificateId: string, options: AppStoreConnectOptions): Promise<void> {
410410
appStoreConnectClient = new AppStoreConnectClient(options);
411411
const request: CertificatesDeleteInstanceData = { path: { id: certificateId } };
412-
core.info(`DELETE /certificates/${certificateId}`);
412+
log(`DELETE /certificates/${certificateId}`);
413413
const { error } = await appStoreConnectClient.api.CertificatesService.certificatesDeleteInstance(request);
414414
if (error) {
415415
checkAuthError(error);

src/AppleCredential.ts

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -192,35 +192,8 @@ export async function RemoveCredentials(): Promise<void> {
192192
}
193193
core.info('Revoking temp signing certificates...');
194194
const authenticationKeyID = core.getState('authenticationKeyID');
195-
// const authenticationKeyIssuerID = core.getState('authenticationKeyIssuerID');
196195
const appStoreConnectKeyPath = `${appStoreConnectKeyDir}/AuthKey_${authenticationKeyID}.p8`;
197196
const certificateDirectory = await getCertificateDirectory();
198-
// const tempSigningCertificateIds = (await fs.promises.readdir(certificateDirectory))
199-
// .filter(file => file.endsWith('.csr'))
200-
// .map(file => {
201-
// // CERTIFICATE_TYPE-353BU6R6PX.csr
202-
// const match = file.match(/^(?<type>[A-Z_]+)-(?<id>[\w-]+)\.csr$/);
203-
// if (!match) {
204-
// core.warning(`Failed to match signing certificate id from ${file}`);
205-
// return null;
206-
// }
207-
// return match.groups?.id;
208-
// }).filter(id => id !== null) as Array<string>;
209-
// if (tempSigningCertificateIds &&
210-
// tempSigningCertificateIds.length > 0) {
211-
// core.info('Revoking temp signing certificates...');
212-
// for (const tempSigningCertificateId of tempSigningCertificateIds) {
213-
// try {
214-
// await RevokeCertificate(tempSigningCertificateId, {
215-
// privateKey: appStoreConnectKeyPath,
216-
// privateKeyId: authenticationKeyID,
217-
// issuerId: authenticationKeyIssuerID
218-
// });
219-
// } catch (error) {
220-
// core.error(`Failed to revoke temp signing certificate ${tempSigningCertificateId}!\n${error.stack}`);
221-
// }
222-
// }
223-
// }
224197
core.info('Removing credentials...');
225198
try {
226199
await fs.promises.unlink(appStoreConnectKeyPath);

0 commit comments

Comments
 (0)