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

feat(shorebird_cli): add channel support to patch and preview commands #1340

Merged
merged 6 commits into from
Oct 2, 2023

Conversation

felangel
Copy link
Contributor

@felangel felangel commented Oct 2, 2023

Description

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

@felangel felangel self-assigned this Oct 2, 2023
@codecov
Copy link

codecov bot commented Oct 2, 2023

Codecov Report

All modified lines are covered by tests ✅

Comparison is base (72d9f8f) 100.00% compared to head (0f0b9bf) 100.00%.
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main     #1340   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          180       180           
  Lines         4676      4724   +48     
=========================================
+ Hits          4676      4724   +48     
Flag Coverage Δ
shorebird_cli 100.00% <100.00%> (ø)
shorebird_code_push_client 100.00% <ø> (ø)
shorebird_code_push_protocol 100.00% <ø> (ø)

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

Files Coverage Δ
.../lib/src/commands/patch/patch_android_command.dart 100.00% <100.00%> (ø)
..._cli/lib/src/commands/patch/patch_ios_command.dart 100.00% <100.00%> (ø)
...horebird_cli/lib/src/commands/preview_command.dart 100.00% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@bryanoltman bryanoltman left a comment

Choose a reason for hiding this comment

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

LGTM, mostly just some naming/readability nits

Comment on lines +412 to +419
for (final file in Directory(outputPath).listSync(recursive: true)) {
if (file is File) {
await encoder.addFile(
file,
file.path.replaceFirst('$outputPath/', ''),
);
}
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Not necessary, but a (maybe) more readable way of writing this:

Directory(outputPath).listSync(recursive: true))
  .whereType<File>()
  .forEach((file) async => 
    await encoder.addFile(
      file,
      file.path.replaceFirst('$outputPath/', ''),
    ),
  );

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I just didn't like the having to iterate through the list twice

@felangel felangel merged commit aefecff into main Oct 2, 2023
10 checks passed
@felangel felangel deleted the feat/channels branch October 2, 2023 18:59
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.

2 participants