checkCommit method
Check that all files are committed.
Implementation
void checkCommit({required bool autoAnswer}) {
assert(_usingGit == true, 'Must be using git');
if (isCommitRequired) {
print('');
print('You have uncommited file.');
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 = getUncommited();
print(notCommited.join('\n'));
}
if (!autoAnswer &&
!confirm('Do you want to continue with the release?')) {
exit(1);
}
}
}