Skip to content

Commit

Permalink
docs: include macOS support (#319)
Browse files Browse the repository at this point in the history
  • Loading branch information
felangel authored Dec 16, 2024
1 parent 070642d commit 1fb1907
Show file tree
Hide file tree
Showing 4 changed files with 99 additions and 3 deletions.
14 changes: 11 additions & 3 deletions src/content/docs/code-push/patch.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,14 @@ shorebird patch android
shorebird patch ios
```

</TabItem>

<TabItem value="patch-command-macos" label="macOS (beta)">

```
shorebird patch macos
```

</TabItem>
</Tabs>

Expand Down Expand Up @@ -94,10 +102,10 @@ variable inside Dart as you might have done with `flutter build` directly.

Patching an application on Android has no effect on performance.

#### iOS
#### iOS and macOS

Patching an application on iOS typically does not affect an application
performance. However the patching mechanism on iOS is different from Android.
Patching an application on iOS and macOS typically does not affect an application
performance. However the patching mechanism on iOS and macOS is different from Android.
Unchanged code runs as normal (on the CPU), changed (or added) code will run in
a Dart interpreter (slower than the CPU). Typically this change is
undetectable, but if you are changing particularly performance-sensitive Dart
Expand Down
66 changes: 66 additions & 0 deletions src/content/docs/code-push/release.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,72 @@ shorebird release ios --export-options-plist=path/to/ExportOptions.plist

</TabItem>

<TabItem value="release-macos" label="macOS (beta)">

Create a macOS release by running the following command:

`shorebird release macos`

Example output:

```
$ shorebird release macos
✓ Fetching apps (0.3s)
✓ Building app bundle with Flutter 3.27.0 (1e0e5760ee) (18.3s)
✓ Fetching releases (0.1s)
🚀 Ready to create a new release!
📱 App: sample (d0cf1d8f-e741-4f5d-b280-b794000df1cd)
📦 Release Version: 1.0.13+2
🕹️ Platform: macos
🐦 Flutter Version: 3.27.0 (1e0e5760ee)
Would you like to continue? (y/N) Yes
✓ Fetching releases (0.1s)
✓ Creating release (0.3s)
✓ Updating release status (0.1s)
✓ Uploading artifacts (3.5s)
✓ Updating release status (1.7s)
✅ Published Release 1.0.13+2!
macOS app created at build/macos/Build/Products/Release/new_flutter_app.app.
To create a patch for this release, run shorebird patch --platforms=macos --release-version=1.0.0+1
Note: shorebird patch --platforms=macos without the --release-version option will patch the current version of the app.
```

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

```bash
shorebird release macos --target ./lib/main_development.dart --flavor development
```

:::note
`shorebird release` 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
release android -- --dart-define="foo=bar"` will define the `"foo"` environment
variable inside Dart as you might have done with `flutter build` directly. In
Powershell the `--` separator must be quoted: `'--'`.
:::

:::note
By default `shorebird release` uses the Flutter version bundled within the shorebird installation.

That version can be checked by running `shorebird doctor`
:::

To release with a different Flutter version, you can specify the version using the `--flutter-version` flag.

```
shorebird release macos --flutter-version 3.24.5
```

</TabItem>

</Tabs>

## Manage Releases
Expand Down
6 changes: 6 additions & 0 deletions src/content/docs/guides/staging-patches.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ shorebird release android

# Create a release for iOS
shorebird release ios

# Create a release for macOS
shorebird release macos
```

We can verify the releases were created successfully by visiting [Shorebird console](https://console.shorebird.dev).
Expand Down Expand Up @@ -95,6 +98,9 @@ shorebird patch android --track=staging

# Stage a patch on iOS
shorebird patch ios --track=staging

# Stage a patch on macOS
shorebird patch macos --track=staging
```

## Preview the release
Expand Down
16 changes: 16 additions & 0 deletions src/content/docs/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,14 @@ shorebird release android
shorebird release ios
```

</TabItem>

<TabItem value="macos" label="macOS (beta)">

```sh
shorebird release macos
```

</TabItem>
</Tabs>

Expand Down Expand Up @@ -271,6 +279,14 @@ shorebird patch ios

</TabItem>

<TabItem value="macos" label="macOS (beta)">

```sh
shorebird patch macos
```

</TabItem>

</Tabs>

### See the patch in action
Expand Down

0 comments on commit 1fb1907

Please sign in to comment.