melos
melos copied to clipboard
request: filter for supported platforms from pubspec
Is there an existing feature request for this?
- [X] I have searched the existing issues.
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 platform melos
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 in pubspec.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