[flutter_conductor] validate git parsed version and release branch match#92064
Merged
fluttergithubbot merged 3 commits intoflutter:masterfrom Oct 20, 2021
Merged
[flutter_conductor] validate git parsed version and release branch match#92064fluttergithubbot merged 3 commits intoflutter:masterfrom
fluttergithubbot merged 3 commits intoflutter:masterfrom
Conversation
| const String revision3 = '123abc'; | ||
| const String previousDartRevision = '171876a4e6cf56ee6da1f97d203926bd7afda7ef'; | ||
| const String nextDartRevision = 'f6c91128be6b77aef8351e1e3a9d07c85bc2e46e'; | ||
| const String previousVersion = '1.2.0-1.0.pre'; |
Contributor
Author
There was a problem hiding this comment.
This version was wrong previously, but nothing was validating it
godofredoc
approved these changes
Oct 19, 2021
Yugue
approved these changes
Oct 19, 2021
| /// Will throw a [ConductorException] if the version is not possible given the | ||
| /// [candidateBranch] and [incrementLetter]. | ||
| void ensureValid(String candidateBranch, String incrementLetter) { | ||
| if (!const <String>{'x', 'y', 'z', 'm', 'n'}.contains(incrementLetter)) { |
Contributor
There was a problem hiding this comment.
Is x a valid increment letter? I thought it was only m, n, y, z.
Contributor
Author
There was a problem hiding this comment.
good point
Contributor
Author
There was a problem hiding this comment.
updated without x
| 'branch $candidateBranch', | ||
| ); | ||
| } | ||
| } |
Contributor
There was a problem hiding this comment.
Just curious, why we don't need to check n or z increment?
Contributor
Author
There was a problem hiding this comment.
incrementLetter is only here because if we're explicitly incrementing m we don't need to validate that the parsed m version matches the branch, since we are using the branch m.
Contributor
|
LGTM |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Since the release version is a calculated based on the previous git tag for beta releases, this calculated version will be wrong if there was not a previous dev release. This adds a validating that the calculated version matches the candidate branch numbers.