checkCommit method
Check that all files are committed.
Implementation
void checkCommit({required bool autoAnswer}) {
assert(_usingGit == true);
if (isCommitRequired) {
print('');
print('You have uncommited files');
print(orange('You MUST commit them before continuing.'));
if (autoAnswer || confirm('Do you want to list them')) {
// we get the list again as the user is likely to have
// committed files after seeing the question.
final notCommited = 'git status --porcelain'.toList();
print(notCommited.join('\n'));
}
if (!autoAnswer && !confirm('Do you want to continue with the release')) {
exit(-1);
}
}
}