James (Peilun) Li | a70e575 | 2024-09-18 20:43:00 -0700 | [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_bot3/constants:constants_formatter", |
| 9 | srcs = [src], |
| 10 | outs = [out], |
| 11 | args = ["$(location %s)" % (src)] + ["$(location %s)" % (out)], |
| 12 | visibility = ["//visibility:public"], |
| 13 | ) |