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 should provide information about releases #140

Open
erickzanardo opened this issue Apr 19, 2024 · 5 comments
Open

Comments

@erickzanardo
Copy link

shorebird_code_push is the pillar for users to implement any custom behaviour that Shorebird does not provides out of the box.

A very common use of it is to manually manage patches, where the developer can suggest users to update to the latest patch, or even block the user from using the app if a certain patch is not installed.

But that is not the same for releases. Since we don't provide any way for developers to get release information programatically.

Developers could rely on package_info_plus to get the current version, but that would get them the current version, they cannot know if there newer releases. There are thirdparty plugins that could do that (like this one), but IMO since shorebird contains all that info, it would provide a more robust, with better developer experience solution if we provided a way for developers to have a way to access the release information programmatically as well.

@bryanoltman
Copy link
Contributor

What release information are you proposing we provide? Requirements for this feature request might look like:

  1. Can retrieve current release version
  2. Can retrieve all release versions

Does that seem right?

@erickzanardo
Copy link
Author

What release information are you proposing we provide? Requirements for this feature request might look like:

  1. Can retrieve current release version
  2. Can retrieve all release versions

Does that seem right?

Yes, that seems pretty much what we would need! In addition, I feel it would be useful if we had a method like hasNewerReleases. Ofc the user could figure that out by getting all releases and the current and then checking manually, but feels like a useful, common method that we could provide to the user.

@bryanoltman
Copy link
Contributor

Can retrieve current release version

Easy to implement, we'll have to think about what the best home for this would be. It feels odd to have this as an Updater API, but maybe it's fine?

Can retrieve all release versions

We'll need to think about what the correct behavior is here. Things that will make this tricky:

  1. Users will have a new Shorebird release before it's available in the store. The end user is probably more interested in what's available to them rather than what Shorebird knows about.
  2. The releases endpoints all require a logged in Shorebird user, which won't be available to devices in the field. We could make a pared-down publicly-available endpoint that simply returns which release versions are available for which platforms, but going back to the point above, I'm not sure how useful this would be.

@eseidel
Copy link
Contributor

eseidel commented Apr 19, 2024

Not directly related, but reminds me of shorebirdtech/shorebird#1288. We've had several requests to be able to attach metadata to releases, this is about pulling existing metadata from the disk it seems.

@bryanoltman
Copy link
Contributor

this is about pulling existing metadata from the disk it seems

As I understand it, it's a mix – both asking about the current release (data from disk) and other available releases (data from the cloud).

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

No branches or pull requests

3 participants