-
Notifications
You must be signed in to change notification settings - Fork 29.7k
[conductor] Fix branch version to use framework branch #103381
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[conductor] Fix branch version to use framework branch #103381
Conversation
|
It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie on the #hackers channel in Chat (don't just cc him here, he won't see it! He's on Discord!). If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix? Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. |
| ); | ||
| stdio.printStatus('Writing candidate branch...'); | ||
| bool needsCommit = await framework.updateCandidateBranchVersion(state.releaseVersion); | ||
| bool needsCommit = await framework.updateCandidateBranchVersion(state.framework.candidateBranch); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not really sure how to test this. Any feedback would be helpful, but i'm not sure why the version was coming out as the branch in the test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looking now....
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can insert the following snippet to the end of this test: https://github.com/flutter/flutter/blob/master/dev/conductor/core/test/next_test.dart#L737
final File rcbVersionFile = fileSystem
.directory(checkoutsParentDirectory)
.childDirectory('framework')
.childDirectory('bin')
.childDirectory('internal')
.childFile('release-candidate-branch.version');
expect(rcbVersionFile.existsSync(), isTrue);
expect(rcbVersionFile.readAsStringSync(), contains(candidateBranch));There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! I did expect(stdio.stdout, contains('release-candidate-branch.version containing $candidateBranch')); to follow the format of the existing tests so if we refactor it's a bit easier.
christopherfujino
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Fixes #101773