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_code_push_protocol): add canSideload field to CreateReleaseArtifactRequest and add support to CLI #1274

Merged
merged 7 commits into from
Sep 18, 2023

Conversation

bryanoltman
Copy link
Contributor

@bryanoltman bryanoltman commented Sep 15, 2023

Description

Adds the canSideload to CreateReleaseArtifactRequest to indicate whether the artifact can be downloaded and run using shorebird preview.

Part of #981

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 15, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (2d047a4) 98.97% compared to head (9407af7) 98.97%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1274   +/-   ##
=======================================
  Coverage   98.97%   98.97%           
=======================================
  Files         180      180           
  Lines        4761     4767    +6     
=======================================
+ Hits         4712     4718    +6     
  Misses         49       49           
Flag Coverage Δ
shorebird_cli 100.00% <ø> (ø)
shorebird_code_push_client 100.00% <100.00%> (ø)
shorebird_code_push_protocol 100.00% <100.00%> (ø)

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

Files Changed Coverage Δ
...horebird_cli/lib/src/code_push_client_wrapper.dart 100.00% <ø> (ø)
.../lib/src/commands/release/release_ios_command.dart 100.00% <ø> (ø)
...ird_code_push_client/lib/src/code_push_client.dart 100.00% <100.00%> (ø)
...ease_artifact/create_release_artifact_request.dart 100.00% <100.00%> (ø)
...se_artifact/create_release_artifact_request.g.dart 100.00% <100.00%> (ø)

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

@bryanoltman bryanoltman changed the title feat(shorebird_code_push_protocol): add canSideload field to CreateReleaseArtifactRequest feat(shorebird_code_push_protocol): add canSideload field to CreateReleaseArtifactRequest and add support to CLI Sep 15, 2023
@@ -32,11 +36,19 @@ class CreateReleaseArtifactRequest {
/// The hash of the artifact.
final String hash;

/// Whether the artifact can installed and run on a device/emulator as-is.
@JsonKey(fromJson: _parseStringToBool, toJson: _parseBoolToString)
Copy link
Contributor

@felangel felangel Sep 18, 2023

Choose a reason for hiding this comment

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

why is this needed? json_serializable can handle bools afaik why do we need to send it down as a string?

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 left a note in the doc comment for the class – this type is used to populate the fields of a http.MultipartRequest, which is Map<String, String>, so all fields serialize to a string. lmk if that could be clearer.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The other part of this change was to createReleaseArtifact in CodePushClient

@bryanoltman bryanoltman merged commit d193729 into main Sep 18, 2023
@bryanoltman bryanoltman deleted the bo/can-sideload-request branch September 18, 2023 15:48
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