fix: filter non-stable version branches in shorebird version detection#117
Merged
bdero merged 2 commits intoshorebird/devfrom Mar 27, 2026
Merged
fix: filter non-stable version branches in shorebird version detection#117bdero merged 2 commits intoshorebird/devfrom
bdero merged 2 commits intoshorebird/devfrom
Conversation
dc4c75c to
a8578c0
Compare
2ed0816 to
6b25fa6
Compare
eseidel
approved these changes
Mar 27, 2026
The shorebird version detection in GitTagVersion.determine() matches flutter_release/* branches to resolve the Flutter version. When non-stable branch names like flutter_release/3.41.4-rc2 are present, parse() fails to match them against the expected version pattern and returns GitTagVersion.unknown(), causing Flutter to report 0.0.0-unknown. Filter branch names to only match stable versions (X.Y.Z) so that release candidate branches are skipped and the correct version is resolved. Fixes shorebirdtech/shorebird#3662
Tests that: - A stable flutter_release branch (e.g. 3.41.4) resolves correctly - A non-stable branch (e.g. 3.41.4-rc2) is skipped, falling through to the upstream tag-based fallback - When both stable and rc branches match, the stable one is picked
6b25fa6 to
ec0a5a4
Compare
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.
Summary
GitTagVersion.determine()matchesflutter_release/*branches to resolve the Flutter versionflutter_release/3.41.4-rc2are present and the stable branch (flutter_release/3.41.4) no longer contains the commit,parse()fails on3.41.4-rc2and returnsGitTagVersion.unknown(), causing Flutter to report0.0.0-unknownas the SDK versionX.Y.Z), skipping release candidate branchesTest plan
3.41.4and rejects3.41.4-rc2Fixes shorebirdtech/shorebird#3662