Fix version command for certain git workflows#52062
Merged
fluttergithubbot merged 6 commits intoflutter:masterfrom Mar 6, 2020
Merged
Fix version command for certain git workflows#52062fluttergithubbot merged 6 commits intoflutter:masterfrom
fluttergithubbot merged 6 commits intoflutter:masterfrom
Conversation
jmagman
approved these changes
Mar 6, 2020
| final String hash; | ||
|
|
||
| static GitTagVersion determine(ProcessUtils processUtils, [String workingDirectory]) { | ||
| _runGit('git fetch https://github.com/flutter/flutter --tags', processUtils, workingDirectory); |
Member
There was a problem hiding this comment.
Would you mind making the repo URL a constant and adopting in fetchRemoteFrameworkCommitDate()?
jonahwilliams
pushed a commit
that referenced
this pull request
Mar 6, 2020
This reverts commit 20bf43b.
jonahwilliams
pushed a commit
that referenced
this pull request
Mar 6, 2020
dnfield
added a commit
to dnfield/flutter
that referenced
this pull request
Mar 6, 2020
…r#52062)" (flutter#52128)" This reverts commit e7d70fb.
This was referenced Mar 6, 2020
Merged
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Description
Fixes #15529 by running
git fetch https://github.com/flutter/flutter --tagsbefore trying to use tags to describe the current version.If there is no network connection, the command just silently fails and we're no worse than we used to be. If there is a network connection, this will end up pulling down tags, and potentially updating the FETCH_HEAD.
Related Issues
Fixes #15529
additional context at #50577
Tests
I added the following tests:
Updated version_test.dart to handle the new invocation of git.
Added a test that asserts we fetch the tags when we try to determine the version.
Checklist
Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes (
[x]). This will ensure a smooth and quick review process.///).flutter analyze --flutter-repo) does not report any problems on my PR.Breaking Change
Did any tests fail when you ran them? Please read Handling breaking changes.