Maxwell Henderson | 3d6d5bf | 2024-02-24 12:49:51 -0800 | [diff] [blame] | 1 | load("@aspect_bazel_lib//lib:run_binary.bzl", "run_binary") |
| 2 | |
| 3 | # Validates the constants.json file and outputs a formatted version. |
| 4 | # TODO(max): Make this generic/template it out into frc971 |
| 5 | def constants_json(name, src, out): |
| 6 | run_binary( |
| 7 | name = name, |
| 8 | tool = "//y2024/constants:constants_formatter", |
| 9 | srcs = [src], |
| 10 | outs = [out], |
| 11 | args = ["$(location %s)" % (src)] + ["$(location %s)" % (out)], |
| 12 | visibility = ["//visibility:public"], |
| 13 | ) |