[go: nahoru, domu]

Skip to content
This repository has been archived by the owner on Feb 22, 2023. It is now read-only.

Commit

Permalink
Update tool commands (#4065)
Browse files Browse the repository at this point in the history
Update CI and README to call the tool via bin/flutter_plugin_tools.dart
rather than lib/src/main.dart to avoid a warning line on every run.
  • Loading branch information
stuartmorgan committed Jun 18, 2021
1 parent 2f4618e commit a583e5b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
4 changes: 2 additions & 2 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ gcp_credentials: ENCRYPTED[ec898795b6f1b54f9cc2ab4104909f1053651f65fcab96397cfdc
only_if: $CIRRUS_TAG == ''
env:
CHANNEL: "master" # Default to master when not explicitly set by a task.
PLUGIN_TOOLS: "dart run ./script/tool/lib/src/main.dart"
PLUGIN_TOOL: "./script/tool/bin/flutter_plugin_tools.dart"

tool_setup_template: &TOOL_SETUP_TEMPLATE
tool_setup_script:
Expand Down Expand Up @@ -58,7 +58,7 @@ task:
format_script: ./script/tool_runner.sh format --fail-on-change
pubspec_script: ./script/tool_runner.sh pubspec-check
license_script:
- dart script/tool/lib/src/main.dart license-check
- dart $PLUGIN_TOOL license-check
- name: test
env:
matrix:
Expand Down
17 changes: 9 additions & 8 deletions script/tool/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ cd ./script/tool && dart pub get && cd ../../
Run:

```sh
dart run ./script/tool/lib/src/main.dart <args>
dart run ./script/tool/bin/flutter_plugin_tools.dart <args>
```

### Published Version
Expand Down Expand Up @@ -58,43 +58,44 @@ Note that the `plugins` argument, despite the name, applies to any package.

```sh
cd <repository root>
dart run ./script/tool/lib/src/main.dart format --plugins plugin_name
dart run ./script/tool/bin/flutter_plugin_tools.dart format --plugins plugin_name
```

### Run the Dart Static Analyzer

```sh
cd <repository root>
dart run ./script/tool/lib/src/main.dart analyze --plugins plugin_name
dart run ./script/tool/bin/flutter_plugin_tools.dart analyze --plugins plugin_name
```

### Run Dart Unit Tests

```sh
cd <repository root>
dart run ./script/tool/lib/src/main.dart test --plugins plugin_name
dart run ./script/tool/bin/flutter_plugin_tools.dart test --plugins plugin_name
```

### Run XCTests

```sh
cd <repository root>
# For iOS:
dart run ./script/tool/lib/src/main.dart xctest --ios --plugins plugin_name
dart run ./script/tool/bin/flutter_plugin_tools.dart xctest --ios --plugins plugin_name
# For macOS:
dart run ./script/tool/lib/src/main.dart xctest --macos --plugins plugin_name
dart run ./script/tool/bin/flutter_plugin_tools.dart xctest --macos --plugins plugin_name
```

### Publish a Release

``sh
cd <path_to_plugins>
git checkout <commit_hash_to_publish>
dart run ./script/tool/lib/src/main.dart publish-plugin --package <package>
dart run ./script/tool/bin/flutter_plugin_tools.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.
additional settings can be configured. Run `dart run ./script/tool/bin/flutter_plugin_tools.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
Expand Down

0 comments on commit a583e5b

Please sign in to comment.