[flutter_conductor] Support initial stable release version (#89775)

This commit is contained in:
Christopher Fujino
2021-09-14 14:39:17 -07:00
committed by GitHub
parent ff5dd54c6e
commit ad936b4e4b
2 changed files with 197 additions and 1 deletions

View File

@@ -315,7 +315,21 @@ class StartCommand extends Command<void> {
if (incrementLetter == 'm') {
nextVersion = Version.fromCandidateBranch(candidateBranch);
} else {
nextVersion = Version.increment(lastVersion, incrementLetter);
if (incrementLetter == 'z') {
if (lastVersion.type == VersionType.stable) {
nextVersion = Version.increment(lastVersion, incrementLetter);
} else {
// This is the first stable release, so hardcode the z as 0
nextVersion = Version(
x: lastVersion.x,
y: lastVersion.y,
z: 0,
type: VersionType.stable,
);
}
} else {
nextVersion = Version.increment(lastVersion, incrementLetter);
}
}
state.releaseVersion = nextVersion.toString();