run method
Runs this command.
The return value is wrapped in a Future
if necessary and returned by
CommandRunner.runCommand
.
Implementation
@override
Future<void> run() async {
final args = ensureArgResults();
if (args.rest.isEmpty) {
throw ArgumentError('Please provide a version to mark the changes.');
}
final version = args.rest.first;
final summary = await writeChangelog(
commits: await getCommits(),
version: version,
);
if (summary is ChangeSummary) {
printer.println(summary.toMarkdown());
}
}