bazel-contrib / bazel-contrib/rules_multitool
os-/cpu-independent targets
- Dominant language
- Starlark
- Stars
- 25
- Forks
- 11
- PR merge metrics
- No merged PRs in 30d
Description
We've been integrating multitool, and we've realized that (due to the :cwd target) it's kind of convenient to be able to register other types of things with multitool, too, which keeps our tool setup nice and consistent. Today, it seems like the `os` and `cpu` fields are mandatory in the spec, but I was wondering what you thought about being able to pin multiple types in one field, for example:
```json
...
"my-shell-script": {
"binaries": [
{
"kind": "file",
"url": "https://raw.githubusercontent.com/my-shell-script.sh",
"sha256": "abc123",
},
...
```
(dropping os/cpu completely, and having it be the equivalent of "all", or alternately, something like this:
```json
...
"my-shell-script": {
"binaries": [
{
"kind": "file",
"url": "https://raw.githubusercontent.com/my-shell-script.sh",
"sha256": "abc123",
"platforms": [
{"os": "linux"}, # also permits a cpu field, and if omitted means "all"
{"os": "darwin"}
],
},
{
"kind": "file",
"url": "https://raw.githubusercontent.com/my-powershell-script.ps1",
"sha256": "abc123",
"platforms": [
{"os": "windows"}
],
},
...
```
In other words, a new platform key which allows one record to support multiple plats, while still being able to express differences.
Contributor guide
Assessment
This issue has not been assessed yet.