forked from flutter/plugins
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update PULL_REQUEST_TEMPLATE.md (flutter#3801)
- Loading branch information
Chris Yang
authored
Apr 20, 2021
1 parent
e2844d2
commit 6398441
Showing
3 changed files
with
72 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,61 @@ | ||
# Flutter Plugin Tools | ||
|
||
Note: The commands in tools are designed to run at the root of the repository or `<repository-root>/packages/`. | ||
|
||
To run the tool: | ||
|
||
```sh | ||
dart pub get | ||
dart run lib/src/main.dart <args> | ||
cd <path_to_plugins>/script/tool && dart pub get && cd ../../ | ||
dart run ./script/tool/lib/src/main.dart <args> | ||
``` | ||
|
||
## Format Code | ||
|
||
```sh | ||
cd <path_to_plugins> | ||
dart run /script/tool/lib/src/main.dart format --plugins plugin_name | ||
``` | ||
|
||
## Run static analyzer | ||
|
||
```sh | ||
cd <path_to_plugins> | ||
pub run ./script/tool/lib/src/main.dart analyze --plugins plugin_name | ||
``` | ||
|
||
## Run Dart unit tests | ||
|
||
```sh | ||
cd <path_to_plugins> | ||
pub run ./script/tool/lib/src/main.dart test --plugins plugin_name | ||
``` | ||
|
||
## Run XCTests | ||
|
||
```sh | ||
cd <path_to_plugins> | ||
dart run lib/src/main.dart xctest --target RunnerUITests --skip <plugins_to_skip> | ||
``` | ||
|
||
## Publish and tag release | ||
|
||
``sh | ||
cd <path_to_plugins> | ||
git checkout <commit_hash_to_publish> | ||
dart run ./script/tool/lib/src/main.dart publish-plugin --package <package> | ||
`` | ||
|
||
By default the tool tries to push tags to the `upstream` remote, but some | ||
additional settings can be configured. Run `dart run ./script/tool/lib/src/main.dart publish-plugin --help` for more usage information. | ||
|
||
The tool wraps `pub publish` for pushing the package to pub, and then will | ||
automatically use git to try to create and push tags. It has some additional | ||
safety checking around `pub publish` too. By default `pub publish` publishes | ||
_everything_, including untracked or uncommitted files in version control. | ||
`publish-plugin` will first check the status of the local | ||
directory and refuse to publish if there are any mismatched files with version | ||
control present. | ||
|
||
There is a lot about this process that is still to be desired. Some top level | ||
items are being tracked in | ||
[flutter/flutter#27258](https://github.com/flutter/flutter/issues/27258). |