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 patch should support patching multiple platforms at once #1762

Closed
felangel opened this issue Feb 28, 2024 · 3 comments
Closed
Labels
enhancement New feature or request

Comments

@felangel
Copy link
Contributor

felangel commented Feb 28, 2024

Description

As a user, I want to be able to patch multiple platforms (e.g iOS and Android) at once and have a single patch number associated with both since the patch contains identical changes.

Currently, even if I want to patch the exact same code for iOS and Android, I have to run shorebird patch android and shorebird patch ios which results in patch 1 and patch 2 respectively and I have to remember that patch 1 and patch 2 contain identical code.

One way we could solve this is by restructuring shorebird patch to be a single command with platforms as an option:

# This will patch all platforms for the current release
shorebird patch

# This will only patch iOS
shorebird patch --platforms=ios

# This will only patch Android
shorebird patch --platforms=android

# This will only patch iOS and MacOS (once we support support desktop)
shorebird patch --platforms=ios,macos

With the proposed solution, running shorebird patch would be reflected as a single patch with multiple platforms on the console and package:shorebird_code_push would return 1 as the current patch number on all platforms which would eliminate any confusion/book-keeping needed when applying platform-agnostic fixes.

Considerations

With the proposed solution, we'd likely want to build all patches first (and if any fail, abort with a summary) and only if all patches are built successfully would be upload them (with a retry for upload failures).

We'd also potentially want to adjust the console to support deactivating a patch for a specific set of platforms.

@wolfenrain
Copy link

This would make it so much easier for me as a user to identify which patch is code-wise shared with other platforms! And the benefit of only being able to patch when all platform patches succeed in building is a nice addition!

@eseidel
Copy link
Contributor

eseidel commented May 9, 2024

This is now done, and will be released shortly as part of version 1.1. This was a side effect of #1988.

@eseidel eseidel closed this as completed May 9, 2024
@erickzanardo
Copy link
Contributor

Extracted the "same patch number across platforms" piece of this issue to a standalone one: #2068

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants