Open benthillerkus opened 12 months ago
Flutter packages have a named platform folder convention already so you can already do this via --dir-exists, e.g.
melos list --dir-exists="macos" --dir-exists="linux"
This is what we do on the FlutterFire repository to filter platforms.
Is there an existing feature request for this?
Command
melos exec --supports-platform=""
Description
As a developer, I want to run melos scripts only on a subset of packages, maybe because I'm on a certain platform, or only want to test for a certain platform.
The way to support that would be through Melos filtering ability.
The
--supports-platform
filter would filter for packages that support the current platformmelos
is being invoked on. Additionally you can specify the platforms you require via a list like so:--supports-platform="macos, linux"
.Which platform a package supports would be based on the
platforms:
field inpubspec.yaml
. If the field is not set, it is assumed that the package supports all platforms.Reasoning
In CI I want to run all tests on Linux, besides ones on packages that don't support Linux (or in my case specifically only support macos)
Additional context and comments
No response