8 Commits

Author SHA1 Message Date
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