Skip to content

fix: filter non-stable version branches in shorebird version detection#117

Merged
bdero merged 2 commits intoshorebird/devfrom
fix/filter-rc-flutter-release
Mar 27, 2026
Merged

fix: filter non-stable version branches in shorebird version detection#117
bdero merged 2 commits intoshorebird/devfrom
fix/filter-rc-flutter-release

Conversation

@bdero
Copy link
Copy Markdown
Member

@bdero bdero commented Mar 24, 2026

Summary

  • 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 and the stable branch (flutter_release/3.41.4) no longer contains the commit, parse() fails on 3.41.4-rc2 and returns GitTagVersion.unknown(), causing Flutter to report 0.0.0-unknown as the SDK version
  • This filters branch names to only match stable versions (X.Y.Z), skipping release candidate branches

Test plan

  • Verified that the regex correctly matches 3.41.4 and rejects 3.41.4-rc2

Fixes shorebirdtech/shorebird#3662

@bdero bdero force-pushed the shorebird/dev branch 2 times, most recently from dc4c75c to a8578c0 Compare March 27, 2026 01:28
@bdero bdero force-pushed the fix/filter-rc-flutter-release branch from 2ed0816 to 6b25fa6 Compare March 27, 2026 03:05
@bdero bdero requested a review from eseidel March 27, 2026 03:05
bdero added 2 commits March 26, 2026 22:54
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
@bdero bdero force-pushed the fix/filter-rc-flutter-release branch from 6b25fa6 to ec0a5a4 Compare March 27, 2026 05:55
@bdero bdero merged commit 76ca3df into shorebird/dev Mar 27, 2026
6 of 7 checks passed
@bdero bdero deleted the fix/filter-rc-flutter-release branch March 27, 2026 05:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix: Flutter SDK version is 0.0.0-unknown

2 participants