12 Commits

Author SHA1 Message Date
9382257ce7 [ci] Move tool_runner.sh (#6038)
`script/tool_runner.sh` has only been intended for CI usage for quite a while, but it still lives in a prominent non-CI location which has been a source of confusion for developers (e.g., people looking at how CI is running things, and reasonably assuming that since the script isn't in a CI-specific location, it's for general use). While running it for simple cases works, it conflicts with any package selection, which is common thing to want to control when running locally.

This makes the following changes:
- Move the script into the .ci directory
- Adds explicit comments that it's not designed for local use, with a pointer to the corresponding local command
- Removes a stale reference to external-to-the-repo use of tool_runner.sh, as that usage no longer exists
  - Also consolidates and updates the links to the external scripts
- Updates a couple of CONTRIBUTING.md comments that still said to run tool_runner.sh
- Opportunistically cleans up some tooling references to .cirrus.yml, found while cleaning up comments in tool_runner.sh and checking for other references.
2024-02-06 19:31:46 +00:00
c4c3e4eba9 [tool] Fix filter-packages-to when everything is changed (#5182)
`filter-packages-to` didn't correctly the handle the case where the set of target packages is empty, meaning that all packages should be tested. This broke it for cases such as changing a CI configuration file, making the filter not take effect.
2023-10-19 15:28:16 +00:00
e04ba886a8 [tool] Add a package inclusion filter (#4904)
Creates a package filter flag that is an opt-in mirror to the `exclude` flag, for use with the automatic package selection options used in CI. Like `exclude`, it allows for YAML files as input.

This allows for creating split test runs in CI (e.g., during incremental migrations), where the same file is an inclusion filter for one run and an exclusion filter for the other, guaranteeing that tests are in one or the other without the possibility of some tests falling through the cracks.
2023-09-12 15:21:00 +00:00
f1f0f240db [tool] Update Dart SDK version (#4402)
Since the tool only needs to support back to Flutter 3.3 (the oldest version we still run CI with), this updates the tool to the corresponding minimum Dart version.

This allows the use of `super` parameters, so `dart fix --apply` was run to convert them all (and remove all the includes that were only needed for setting default values).

Also opportunistically cleans up a bunch of unnecessary, very old `dart:async` includes. (Other than those removals, the changes here are all `dart fix`-generated.)
2023-07-08 14:31:19 +00:00
902e4bef4c [tool] Fix --current-package for app-facing packages (#4399)
The new `--current-package` flag was returning `foo` when run in the app-facing package of a federated plugin called `foo`, but `foo` as a package argument is treated as being the entire group, so it was running all for all of the packages in the plugin. This fixes it to return `foo/foo` in that case, which is how the tool targets app-facing packages specifically.
2023-07-07 19:04:13 +00:00
eed9b68284 [tool] Allow running from anywhere (#4199)
Now that the repo tooling is always run from source, not via `pub global`, we no longer need to infer the repo location from the current directory. Instead, hard-code knowledge of where the repository root is. This makes it much easier to run the tooling, since it's common to be in a package directory rather than the repo root.

To make it even easier to run from within a package, this also adds a `--current-package` as an alternative to `--packages`. This makes it possible to, e.g., write local wrapper scripts that run a specific set of commands on whatever the current package happens to be (such as a generic version of the script discussed in https://github.com/flutter/packages/pull/4129).

As related cleanup, makes the tool non-publishable (we haven't been publishing it since the repo merge, but I never made it unpublishable; this is important now that it would not work if published) and remove the LICENSE and CHANGELOG since it's no longer a stand-alone package.

Fixes https://github.com/flutter/flutter/issues/128231
Fixes https://github.com/flutter/flutter/issues/128232
2023-06-13 17:24:56 +00:00
f224eea858 [tool] Add pigeon support to update-dependency (#3640)
[tool] Add pigeon support to update-dependency
2023-04-05 10:44:19 +00:00
dc54dd7116 [tool] More main-branch detection improvement (#7067)
Follow-up to https://github.com/flutter/plugins/pull/7038 to try to make
it work on LUCI. Looking at the checkout steps of a LUCI run, it looks
like we do a full `fetch` of `origin`, but likely only have a `master`
branch locally. Rather than rely on a specific local branch name
existing, this allows for checking `origin` (and just in case, since
it's another common remote name, `upstream`).

Hopefully fixes https://github.com/flutter/flutter/issues/119330
2023-01-31 19:52:49 -05:00
07c367cfd2 [tool] Improve main-branch detection (#7038)
* [tool] Improve main-branch detection

Currently main-branch detection for `--packages-for-branch` looks at
branch names, but this no longer works on LUCI which now seems to be
checking out specific hashes rather than branches. This updates the
behavior so that it will treat any hash that is an ancestor of `main` as
being part of `main`, which should allow post-submit detection to work
under LUCI.

Fixes https://github.com/flutter/flutter/issues/119330

* Fix throw

* Fix typos

* Update comment
2023-01-30 21:32:05 +00:00
28bdd6dff8 [tool] Improve changed-package run mode logging (#6521) 2022-09-30 21:55:50 +00:00
d231b240f1 [tool] Only run postsubmit on changed packages (#6516) 2022-09-30 14:53:12 +00:00
9974a8ef44 [tool] Clean up "plugin" references (#6503) 2022-09-27 19:43:04 +00:00