Philipp Schrader | d9096a3 | 2022-02-24 17:53:09 -0800 | [diff] [blame] | 1 | load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library") |
| 2 | |
| 3 | go_library( |
| 4 | name = "cli_lib", |
| 5 | srcs = ["main.go"], |
| 6 | data = [ |
| 7 | "//scouting/webserver/requests/messages:fbs_files", |
| 8 | "@com_github_google_flatbuffers//:flatc", |
| 9 | ], |
| 10 | importpath = "github.com/frc971/971-Robot-Code/scouting/webserver/requests/debug/cli", |
| 11 | target_compatible_with = ["@platforms//cpu:x86_64"], |
| 12 | visibility = ["//visibility:private"], |
| 13 | deps = ["//scouting/webserver/requests/debug"], |
| 14 | ) |
| 15 | |
| 16 | go_binary( |
| 17 | name = "cli", |
| 18 | embed = [":cli_lib"], |
| 19 | target_compatible_with = ["@platforms//cpu:x86_64"], |
| 20 | visibility = ["//visibility:public"], |
| 21 | ) |
| 22 | |
| 23 | py_test( |
| 24 | name = "cli_test", |
| 25 | srcs = [ |
| 26 | "cli_test.py", |
| 27 | ], |
| 28 | data = [ |
| 29 | ":cli", |
| 30 | "//scouting/webserver", |
| 31 | ], |
| 32 | ) |