Skip to content

Commit 89a3664

Browse files
authored
Merge branch 'main' into deps/flutter/scripts/update-android.sh/7.0.0
2 parents e9d09d9 + 9d7e862 commit 89a3664

File tree

2 files changed

+59
-3
lines changed

2 files changed

+59
-3
lines changed

docs/new-package-release-checklist.md

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# New Package Release Checklist
2+
3+
This page serves as a checklist of what to do when releasing a new package for the first time.
4+
5+
## Release Preparation
6+
7+
- [ ] Make sure the project is set up
8+
- [ ] The package only exports the public API
9+
- [ ] The package contains an example folder
10+
- [ ] The package contains a README.md file
11+
- [ ] CI badges show a status
12+
- [ ] The package contains a CHANGELOG.md file (symlink to the root changelog)
13+
- [ ] The package contains a dartdoc_options.yaml file (symlink to the root file)
14+
- [ ] The package contains a LICENSE (default is `MIT`)
15+
- [ ] The package contains a pubspec.yaml file
16+
- [ ] The package contains a analysis_options.yaml file
17+
18+
- [ ] Update the [Flutter example](https://github.com/getsentry/sentry-dart/tree/main/flutter/example) to use your new package if applicable
19+
20+
- [ ] Make sure your new package has a `version.dart` in the `lib/src` folder.
21+
- This is used to set the version and package in the `Hub`. See this [example](https://github.com/getsentry/sentry-dart/blob/8609bd8dd7ea572e5d241a59643c7570e5621bda/sqflite/lib/src/sentry_database.dart#L69).
22+
- The version will be updated to the newest version after triggering the release process.
23+
24+
- [ ] Create a new workflow called `your-package-name.yml` for building and testing the package.
25+
26+
- [ ] Excluding `your-package-name.yml`, add the package to the `paths-ignore` section of all package workflow files.
27+
- For examples see `sqflite.yml`, `dio.yml` etc...
28+
29+
- [ ] Add an entry to [diagram.yml](https://github.com/getsentry/sentry-dart/blob/main/.github/workflows/diagrams.yml) for your package.
30+
31+
- [ ] In the root `.gitignore` file add the package coverage as ignored.
32+
33+
The `analyze` workflow will fail in your PR and in the main branch because the package is not released yet and the `pubspec.yaml` is not 'valid' according to the analyzer.
34+
This is expected - it will succeed after the release.
35+
- [ ] Make sure the analyze workflow doesn't have other failures, only the one mentioned above.
36+
37+
- [ ] **Very important**: add your package to `scripts/bump-version.sh`.
38+
39+
## Doing the Release
40+
41+
Do these steps in the **correct order**
42+
43+
- [ ] Add your package only as a `pub-dev` target in `.craft.yml`. (**not registry**)
44+
- The release process might fail if you add it to the registry at this point.
45+
- [ ] Trigger the release
46+
- [ ] Check that the release bot successfully updated the versions in `version.dart` and `pubspec.yaml` in the release branch.
47+
48+
## After the first release
49+
50+
- [ ] Check if package is succesfully released on `pub.dev`
51+
- [ ] Add the package to the Sentry Release Registry
52+
- Instructions on how to do this can be found [here](https://github.com/getsentry/sentry-release-registry#adding-new-sdks)
53+
- [Example PR](https://github.com/getsentry/sentry-release-registry/pull/136)
54+
- [ ] Add an entry to `.craft.yml` for the package in the `registry` section.
55+
- Now all future releases will be added to the registry automatically.
56+
- [ ] Update the repo's `README.md`
57+
- [ ] Prepare and merge [Sentry documentation](https://github.com/getsentry/sentry-docs/)

flutter/example/lib/main.dart

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -231,9 +231,8 @@ class MainScaffold extends StatelessWidget {
231231
buttonTitle: 'Dart: try catch',
232232
),
233233
TooltipButton(
234-
onPressed: () => Scaffold.of(context).showBottomSheet<dynamic>(
235-
(context) => const Text('Scaffold error'),
236-
),
234+
onPressed: () => Scaffold.of(context)
235+
.showBottomSheet((context) => const Text('Scaffold error')),
237236
text:
238237
'Creates an uncaught exception and sends it to Sentry. This demonstrates how our flutter error integration catches unhandled exceptions.',
239238
buttonTitle: 'Flutter error : Scaffold.of()',

0 commit comments

Comments
 (0)