Skip to content

Commit b11b96e

Browse files
revert
1 parent 282881d commit b11b96e

3 files changed

Lines changed: 67 additions & 107 deletions

File tree

dist/index.js

Lines changed: 32 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -59482,23 +59482,17 @@ async function getWhatsNew() {
5948259482
async function execXcodeBuild(xcodeBuildArgs) {
5948359483
let exitCode = 1;
5948459484
let output = '';
59485-
core.startGroup(`${blue}xcodebuild ${xcodeBuildArgs.join(' ')}${reset}`);
59486-
try {
59487-
exitCode = await (0, exec_1.exec)(xcodebuild, xcodeBuildArgs, {
59488-
listeners: {
59489-
stdout: (data) => {
59490-
output += data.toString();
59491-
},
59492-
stderr: (data) => {
59493-
output += data.toString();
59494-
},
59485+
exitCode = await (0, exec_1.exec)(xcodebuild, xcodeBuildArgs, {
59486+
listeners: {
59487+
stdout: (data) => {
59488+
output += data.toString();
5949559489
},
59496-
ignoreReturnCode: true
59497-
});
59498-
}
59499-
finally {
59500-
core.endGroup();
59501-
}
59490+
stderr: (data) => {
59491+
output += data.toString();
59492+
},
59493+
},
59494+
ignoreReturnCode: true
59495+
});
5950259496
if (exitCode !== 0) {
5950359497
await parseBundleLog(output);
5950459498
throw new Error(`xcodebuild exited with code: ${exitCode}`);
@@ -59516,28 +59510,22 @@ async function execWithXcBeautify(xcodeBuildArgs) {
5951659510
const xcBeautifyProcess = (0, child_process_1.spawn)('xcbeautify', ['--quiet', '--is-ci', '--disable-logging'], {
5951759511
stdio: ['pipe', process.stdout, process.stderr]
5951859512
});
59519-
core.startGroup(`${blue}${xcodebuild} ${xcodeBuildArgs.join(' ')}${reset}`);
59513+
core.info(`[command]${xcodebuild} ${xcodeBuildArgs.join(' ')}`);
5952059514
let errorOutput = '';
59521-
let exitCode = 1;
59522-
try {
59523-
exitCode = await (0, exec_1.exec)(xcodebuild, xcodeBuildArgs, {
59524-
listeners: {
59525-
stdout: (data) => {
59526-
xcBeautifyProcess.stdin.write(data);
59527-
},
59528-
stderr: (data) => {
59529-
xcBeautifyProcess.stdin.write(data);
59530-
errorOutput += data.toString();
59531-
}
59515+
const exitCode = await (0, exec_1.exec)(xcodebuild, xcodeBuildArgs, {
59516+
listeners: {
59517+
stdout: (data) => {
59518+
xcBeautifyProcess.stdin.write(data);
5953259519
},
59533-
silent: true,
59534-
ignoreReturnCode: true
59535-
});
59536-
}
59537-
finally {
59538-
xcBeautifyProcess.stdin.end();
59539-
core.endGroup();
59540-
}
59520+
stderr: (data) => {
59521+
xcBeautifyProcess.stdin.write(data);
59522+
errorOutput += data.toString();
59523+
}
59524+
},
59525+
silent: true,
59526+
ignoreReturnCode: true
59527+
});
59528+
xcBeautifyProcess.stdin.end();
5954159529
await new Promise((resolve, reject) => {
5954259530
xcBeautifyProcess.stdin.on('finish', () => {
5954359531
xcBeautifyProcess.on('close', (code) => {
@@ -59563,7 +59551,6 @@ async function execXcRun(args) {
5956359551
if (core.isDebug()) {
5956459552
args.push('-verbose');
5956559553
}
59566-
core.startGroup(`${blue}xcrun ${args.join(' ')}${reset}`);
5956759554
try {
5956859555
exitCode = await (0, exec_1.exec)(xcrun, args, {
5956959556
listeners: {
@@ -59578,7 +59565,6 @@ async function execXcRun(args) {
5957859565
});
5957959566
}
5958059567
finally {
59581-
core.endGroup();
5958259568
if (isJsonOutput) {
5958359569
const jsonMatch = output.match(/\{[\s\S]*\}/);
5958459570
if (jsonMatch) {
@@ -59599,20 +59585,14 @@ async function execXcRun(args) {
5959959585
async function execGit(args) {
5960059586
let exitCode = 1;
5960159587
let output = '';
59602-
core.startGroup(`${blue}git ${args.join(' ')}${reset}`);
59603-
try {
59604-
exitCode = await (0, exec_1.exec)('git', args, {
59605-
listeners: {
59606-
stdout: (data) => {
59607-
output += data.toString();
59608-
}
59609-
},
59610-
ignoreReturnCode: true
59611-
});
59612-
}
59613-
finally {
59614-
core.endGroup();
59615-
}
59588+
exitCode = await (0, exec_1.exec)('git', args, {
59589+
listeners: {
59590+
stdout: (data) => {
59591+
output += data.toString();
59592+
}
59593+
},
59594+
ignoreReturnCode: true
59595+
});
5961659596
if (exitCode > 0) {
5961759597
(0, utilities_1.log)(output, 'error');
5961859598
throw new Error(`Git failed with exit code: ${exitCode}`);

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: 34 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1227,23 +1227,17 @@ async function execXcodeBuild(xcodeBuildArgs: string[]): Promise<string> {
12271227
let exitCode: number = 1;
12281228
let output: string = '';
12291229

1230-
core.startGroup(`${blue}xcodebuild ${xcodeBuildArgs.join(' ')}${reset}`);
1231-
1232-
try {
1233-
exitCode = await exec(xcodebuild, xcodeBuildArgs, {
1234-
listeners: {
1235-
stdout: (data: Buffer) => {
1236-
output += data.toString();
1237-
},
1238-
stderr: (data: Buffer) => {
1239-
output += data.toString();
1240-
},
1230+
exitCode = await exec(xcodebuild, xcodeBuildArgs, {
1231+
listeners: {
1232+
stdout: (data: Buffer) => {
1233+
output += data.toString();
12411234
},
1242-
ignoreReturnCode: true
1243-
});
1244-
} finally {
1245-
core.endGroup();
1246-
}
1235+
stderr: (data: Buffer) => {
1236+
output += data.toString();
1237+
},
1238+
},
1239+
ignoreReturnCode: true
1240+
});
12471241

12481242
if (exitCode !== 0) {
12491243
await parseBundleLog(output);
@@ -1265,28 +1259,24 @@ async function execWithXcBeautify(xcodeBuildArgs: string[]) {
12651259
stdio: ['pipe', process.stdout, process.stderr]
12661260
});
12671261

1268-
core.startGroup(`${blue}${xcodebuild} ${xcodeBuildArgs.join(' ')}${reset}`);
1269-
let errorOutput: string = '';
1270-
let exitCode: number = 1;
1262+
core.info(`[command]${xcodebuild} ${xcodeBuildArgs.join(' ')}`);
12711263

1272-
try {
1273-
exitCode = await exec(xcodebuild, xcodeBuildArgs, {
1274-
listeners: {
1275-
stdout: (data: Buffer) => {
1276-
xcBeautifyProcess.stdin.write(data);
1277-
},
1278-
stderr: (data: Buffer) => {
1279-
xcBeautifyProcess.stdin.write(data);
1280-
errorOutput += data.toString();
1281-
}
1264+
let errorOutput = '';
1265+
const exitCode = await exec(xcodebuild, xcodeBuildArgs, {
1266+
listeners: {
1267+
stdout: (data: Buffer) => {
1268+
xcBeautifyProcess.stdin.write(data);
12821269
},
1283-
silent: true,
1284-
ignoreReturnCode: true
1285-
});
1286-
} finally {
1287-
xcBeautifyProcess.stdin.end();
1288-
core.endGroup();
1289-
}
1270+
stderr: (data: Buffer) => {
1271+
xcBeautifyProcess.stdin.write(data);
1272+
errorOutput += data.toString();
1273+
}
1274+
},
1275+
silent: true,
1276+
ignoreReturnCode: true
1277+
});
1278+
1279+
xcBeautifyProcess.stdin.end();
12901280

12911281
await new Promise<void>((resolve, reject) => {
12921282
xcBeautifyProcess.stdin.on('finish', () => {
@@ -1316,8 +1306,6 @@ async function execXcRun(args: string[]): Promise<string> {
13161306
args.push('-verbose');
13171307
}
13181308

1319-
core.startGroup(`${blue}xcrun ${args.join(' ')}${reset}`);
1320-
13211309
try {
13221310
exitCode = await exec(xcrun, args, {
13231311
listeners: {
@@ -1331,8 +1319,6 @@ async function execXcRun(args: string[]): Promise<string> {
13311319
ignoreReturnCode: true
13321320
});
13331321
} finally {
1334-
core.endGroup();
1335-
13361322
if (isJsonOutput) { // pretty print json output
13371323
// Use regex to extract the first JSON object from the output
13381324
const jsonMatch = output.match(/\{[\s\S]*\}/);
@@ -1359,20 +1345,14 @@ async function execGit(args: string[]): Promise<string> {
13591345
let exitCode: number = 1;
13601346
let output: string = '';
13611347

1362-
core.startGroup(`${blue}git ${args.join(' ')}${reset}`);
1363-
1364-
try {
1365-
exitCode = await exec('git', args, {
1366-
listeners: {
1367-
stdout: (data: Buffer) => {
1368-
output += data.toString();
1369-
}
1370-
},
1371-
ignoreReturnCode: true
1372-
});
1373-
} finally {
1374-
core.endGroup();
1375-
}
1348+
exitCode = await exec('git', args, {
1349+
listeners: {
1350+
stdout: (data: Buffer) => {
1351+
output += data.toString();
1352+
}
1353+
},
1354+
ignoreReturnCode: true
1355+
});
13761356

13771357
if (exitCode > 0) {
13781358
log(output, 'error');

0 commit comments

Comments
 (0)