Skip to content

Commit

Permalink
docs: expand the "when should I patch" answer. (#273)
Browse files Browse the repository at this point in the history
* docs: expand the "when should I patch" answer.

* Update src/content/docs/faq.mdx

Co-authored-by: Bryan Oltman <[email protected]>

* Update src/content/docs/faq.mdx

Co-authored-by: Bryan Oltman <[email protected]>

* Update src/content/docs/faq.mdx

Co-authored-by: Bryan Oltman <[email protected]>

* Update src/content/docs/faq.mdx

Co-authored-by: Bryan Oltman <[email protected]>

* Update src/content/docs/faq.mdx

Co-authored-by: Bryan Oltman <[email protected]>

* Update src/content/docs/faq.mdx

Co-authored-by: Bryan Oltman <[email protected]>

* Update src/content/docs/faq.mdx

Co-authored-by: Bryan Oltman <[email protected]>

* fix faq link

* Update src/content/docs/faq.mdx

Co-authored-by: Bryan Oltman <[email protected]>

---------

Co-authored-by: Bryan Oltman <[email protected]>
  • Loading branch information
eseidel and bryanoltman authored Jul 22, 2024
1 parent 4f9eac2 commit f610fa1
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 4 deletions.
4 changes: 3 additions & 1 deletion src/content/docs/concepts.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ title: Code Push Concepts
description: Concepts used in Shorebird's code push product.
---

{/* cspell:words pubspec libapp */}

An explanation of the concepts used in Shorebird's code push product.

## Code Push
Expand Down Expand Up @@ -71,7 +73,7 @@ When your application starts, it checks for available patches and applies the la
Patches are created by running `shorebird patch [platform]`, where `platform` is `android`, `aar`, or `ios`.

:::note
For more information regarding when to create a patch, refer to our [FAQs](/faq#when-should-i-create-a-patch)
For more information regarding when to create a patch, refer to our [FAQs](/faq#when-should-i-create-a-patch-vs-a-release)
:::

### Artifact
Expand Down
35 changes: 32 additions & 3 deletions src/content/docs/faq.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ title: FAQ
description: Frequently asked questions.
---

{/* cspell:words appcenter codepush aarch rollouts */}

If you have questions not answered here, please ask! Both filing an issue
or asking on [Discord](https://discord.gg/shorebird) work.

Expand Down Expand Up @@ -449,11 +451,38 @@ If you'd like to segment availability of Shorebird patches, there are 4 potentia

Yes. Apps built with Shorebird will continue to function normally (as if they had been built without Shorebird), including those that have had patches installed.

### When should I create a patch?
### When should I create a patch vs a release?

Because patching and releasing are independent operations, it is possible to
create both a patch and a release with the same code changes.

:::note
A "release" gets a unique release version, while a "patch" does not change
the release version, just the "patch number". The "release version" is a store
concept, where as "patch number" is a Shorebird concept. Apps can read the
current patch version at runtime via the
[package:shorebird_code_push](https://pub.dev/packages/shorebird_code_push).
:::

Different customers have used different policies to decide whether to create a release, a patch, or both. I'll enumerate a few of these here:

1. Push a patch immediately to update all existing users, while
also simultaneously submitting a release to the stores so that new users to
their product will get the latest code on first launch after a store
install.

2. Use patching as a mechanism to ship changes on a high
frequency (e.g. daily or weekly) and only go through a full release process
on a lower cadence (e.g. monthly).

3. Continue to only use releases for shipping code changes, and only patch to fix critical bugs or make other emergency changes.

Generally, you should create patches when fixing bugs that **DO NOT** contain native changes or asset changes. For all other changes, you should likely create a new release.
In the end, it comes down to what works for your business. We see most of our current customers choosing option 2.

If distributing through stores, please refer to store policies for additional guidelines.
:::note
Changes which involve native code cannot be patched and thus must use a
release for distribution.
:::

## Billing

Expand Down

0 comments on commit f610fa1

Please sign in to comment.