Skip to content
This repository has been archived by the owner on Feb 19, 2024. It is now read-only.

Commit

Permalink
fix(release): begin handling next steps for merge
Browse files Browse the repository at this point in the history
  • Loading branch information
ostowe committed Jun 30, 2021
1 parent 97415bd commit f48d28c
Showing 1 changed file with 7 additions and 11 deletions.
18 changes: 7 additions & 11 deletions bin/reconcile-release
Original file line number Diff line number Diff line change
Expand Up @@ -37,23 +37,19 @@ inquirer
try {
execSync(`git merge ${releaseBranch}`).toString('utf8');
} catch (e) {
console.log(e.message);
if (e.message.includes('Automatic merge failed')) {
const gitMessage = e.stdout.toString('utf8');

if (gitMessage.includes('Automatic merge failed')) {
return inquirer.prompt([
{
type: 'confirm',
name: 'dependencies',
message: 'have any dependencies been installed in the release branch that have not been merged into main?',
message: 'Have any dependencies been installed in the release branch that have not been merged into main?',
},
]);
} else {
return inquirer.prompt([
{
type: 'confirm',
name: 'error',
message: `${e.message} ${e.status} ${e.stdout.toString('utf8')} ${e.stderr.toString('utf8')}`,
},
]);
console.log(chalk.red('An unknown error ocurred, try again', e.message));
}
}
});
})
.then(({ dependencies}) => console.log(dependencies));

0 comments on commit f48d28c

Please sign in to comment.