blob: 9b8adee4f97f79579a29b941515232450f6efc72 [file] [log] [blame]
Philipp Schraderc61f73b2022-02-23 23:58:37 -08001load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library")
Philipp Schrader684a8e82022-02-25 17:39:28 -08002load("//tools/build_rules:js.bzl", "turn_files_into_runfiles")
Sabina Leaver12e8fa42021-12-08 20:41:05 -08003
4go_binary(
5 name = "sql_demo",
6 embed = [":scouting_lib"],
7 target_compatible_with = ["@platforms//cpu:x86_64"],
8 visibility = ["//visibility:public"],
9)
10
11go_library(
12 name = "scouting_lib",
13 srcs = ["sql_demo.go"],
14 importpath = "github.com/frc971/971-Robot-Code/scouting",
15 target_compatible_with = ["@platforms//cpu:x86_64"],
16 visibility = ["//visibility:private"],
Philipp Schraderd96d4cb2022-02-06 15:37:29 -080017 deps = ["@com_github_mattn_go_sqlite3//:go-sqlite3"],
Sabina Leaver12e8fa42021-12-08 20:41:05 -080018)
Philipp Schrader684a8e82022-02-25 17:39:28 -080019
20turn_files_into_runfiles(
21 name = "main_bundle_compiled_runfiles",
22 files = "//scouting/www:main_bundle_compiled",
23)
24
25sh_binary(
26 name = "scouting",
27 srcs = [
28 "scouting.sh",
29 ],
30 data = [
31 ":main_bundle_compiled_runfiles",
32 "//scouting/webserver",
33 "//scouting/www:index.html",
34 "//scouting/www:zonejs_copy",
35 ],
36)
37
38py_test(
39 name = "scouting_test",
40 srcs = [
41 "scouting_test.py",
42 ],
43 data = [
44 ":scouting",
45 ],
46)