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 currentVersion = await nextVersionCommand.getVersionFromPubspec();
final currentVersionWithoutBuild =
versionStringWithoutBuild(currentVersion);
final tagId = await remoteTagIdCommand.getRemoteTagId(
currentVersionWithoutBuild,
'origin',
);
final commits = await changelogCommand.getCommitsFromId(
tagId.isEmpty ? null : tagId,
);
final nextVersion = await nextVersionCommand.getNextVersionFromString(
commits,
currentVersion,
incrementBuild: true,
);
if (nextVersion != currentVersion) {
await _createRelease(
commits: commits,
nextVersion: nextVersion,
);
} else {
printer.println('There are no releasable commits');
}
}