Skip to content
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

fix(shorebird_cli): ensure system flutter pub get is run even if build fails #1231

Merged
merged 2 commits into from
Sep 7, 2023

Conversation

bryanoltman
Copy link
Contributor

Description

Wraps flutter build commands that use Shorebird's version of flutter in a try/finally that invokes flutter pub get in the finally block to ensure that .dart_tool/package_config.json points to the system version of Flutter whether or not the shorebird build succeeds.

Fixes #1193

Type of Change

  • ✨ New feature (non-breaking change which adds functionality)
  • 🛠️ Bug fix (non-breaking change which fixes an issue)
  • ❌ Breaking change (fix or feature that would cause existing functionality to change)
  • 🧹 Code refactor
  • ✅ Build configuration change
  • 📝 Documentation
  • 🗑️ Chore

@codecov
Copy link

codecov bot commented Sep 7, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (db19456) 98.92% compared to head (d563728) 98.92%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1231   +/-   ##
=======================================
  Coverage   98.92%   98.92%           
=======================================
  Files         180      180           
  Lines        4574     4577    +3     
=======================================
+ Hits         4525     4528    +3     
  Misses         49       49           
Flag Coverage Δ
shorebird_cli 100.00% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Changed Coverage Δ
...s/shorebird_cli/lib/src/shorebird_build_mixin.dart 100.00% <100.00%> (ø)

☔ View full report in Codecov by Sentry.

📢 Have feedback on the report? Share it here.

Copy link
Contributor

@eseidel eseidel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very hard to read the diff, but assuming you're just wrapping in a finally, lgtm.

@bryanoltman bryanoltman merged commit 156a61b into main Sep 7, 2023
@bryanoltman bryanoltman deleted the bo/pub-get-finally branch September 7, 2023 18:47
@eseidel eseidel mentioned this pull request Sep 8, 2023
46 tasks
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: when shorebird builds fail packages_config.json can be left pointing to shorebird flutter
2 participants