defaultVersionToOffer function
Implementation
List<NewVersion> defaultVersionToOffer(Version currentVersion,
{bool includePre = false}) {
final versions = <NewVersion>[
NewVersion((includePre ? 'Small Patch' : 'Release').padRight(25),
currentVersion.nextPatch)
];
var minor = currentVersion.nextMinor;
if (minor == currentVersion.nextPatch) {
minor = minor.nextMinor;
}
versions
..add(NewVersion('Non-breaking change'.padRight(25), minor))
..addAll([
NewVersion('Breaking change'.padRight(25), currentVersion.nextBreaking),
NewVersion('Keep the current Version'.padRight(25), currentVersion),
if (includePre)
PreReleaseVersion('Pre-release'.padRight(25), currentVersion),
CustomVersion('Enter custom version no.'.padRight(25))
]);
return versions;
}