Skip to main content

Push Updates

Once you have published a release of your app, you can push updates using one of the shorebird patch commands.

shorebird patch android

This will do several things:

  1. Builds the artifacts for the update.
  2. Downloads the corresponding release artifacts.
  3. Generates a patch using the diff between the release and the current changes.
  4. Uploads the patch artifacts to the Shorebird backend
  5. Promotes the patch to the stable channel.

Example output:

$ shorebird patch android
βœ“ Building patch (3.0s)
βœ“ Fetching apps (0.2s)
βœ“ Detecting release version (0.3s)
βœ“ Fetching release (77ms)
βœ“ Fetching Flutter revision (15ms)
βœ“ Fetching release artifacts (0.3s)
βœ“ Downloading release artifacts (1.9s)
βœ“ Creating artifacts (4.1s)

πŸš€ Ready to publish a new patch!

πŸ“± App: My App (61fc9c16)
πŸ“¦ Release Version: 0.1.0+1
πŸ“Ί Channel: stable
πŸ•ΉοΈ Platform: android [arm64 (166.20 KB), arm32 (161.78 KB), x86_64 (161.51 KB)]

Would you like to continue? (y/N) Yes
βœ“ Creating patch (93ms)
βœ“ Uploading artifacts (1.5s)
βœ“ Fetching channels (86ms)
βœ“ Promoting patch to stable (78ms)

βœ… Published Patch!

By default, this uses the release version that the app is currently on. If you want to patch a different release version, you can use the --release-version option. For example:

shorebird patch android --release-version 0.1.0+1

If your application supports flavors or multiple release targets, you can specify the flavor and target using the --flavor and --target options:

shorebird patch [android|ios] --target lib/main_development.dart --flavor development
info

shorebird patch wraps flutter build and can take any argument flutter build can. To pass arguments to the underlying flutter build you need to put flutter build arguments after a -- separator. For example: shorebird patch android -- --dart-define="foo=bar" will define the "foo" environment variable inside Dart as you might have done with flutter build directly.