-
Notifications
You must be signed in to change notification settings - Fork 32
/
BUILD.bazel
106 lines (96 loc) · 2.56 KB
/
BUILD.bazel
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library")
load("@bazel_gazelle//:def.bzl", "gazelle")
# load(":rules.bzl", "foo_binary")
# gazelle:prefix github.com/macadmins/osquery-extension
gazelle(name = "gazelle")
gazelle(
name = "gazelle-update-repos",
args = [
"-from_file=go.mod",
"-to_macro=deps.bzl%go_dependencies",
"-prune",
],
command = "update-repos",
)
genrule(
name = "version_config",
srcs = [
"VERSION",
"write_version_config.sh",
], # Ensure dependencies are listed
outs = ["version_config.go"],
cmd = "$(location write_version_config.sh) $@",
stamp = 1,
tools = ["write_version_config.sh"],
)
go_library(
name = "osquery-extension_lib",
# keep
srcs = [
"main.go",
":version_config",
],
importpath = "github.com/macadmins/osquery-extension",
visibility = ["//visibility:private"],
deps = [
"//tables/alt_system_info",
"//tables/authdb",
"//tables/chromeuserprofiles",
"//tables/fileline",
"//tables/filevaultusers",
"//tables/macos_profiles",
"//tables/macosrsr",
"//tables/mdm",
"//tables/munki",
"//tables/networkquality",
"//tables/pendingappleupdates",
"//tables/puppet",
"//tables/sofa",
"//tables/unifiedlog",
"//tables/wifi_network",
"@com_github_osquery_osquery_go//:osquery-go",
"@com_github_osquery_osquery_go//plugin/table",
],
)
go_binary(
name = "osquery-extension-mac-arm",
embed = [":osquery-extension_lib"],
goarch = "arm64",
goos = "darwin",
visibility = ["//visibility:public"],
)
go_binary(
name = "osquery-extension-mac-amd",
embed = [":osquery-extension_lib"],
goarch = "amd64",
goos = "darwin",
visibility = ["//visibility:public"],
)
go_binary(
name = "osquery-extension-win-arm",
embed = [":osquery-extension_lib"],
goarch = "arm64",
goos = "windows",
visibility = ["//visibility:public"],
)
go_binary(
name = "osquery-extension-win-amd",
embed = [":osquery-extension_lib"],
goarch = "amd64",
goos = "windows",
visibility = ["//visibility:public"],
)
go_binary(
name = "osquery-extension-linux-amd",
embed = [":osquery-extension_lib"],
goarch = "amd64",
goos = "linux",
visibility = ["//visibility:public"],
)
go_binary(
name = "osquery-extension-linux-arm",
embed = [":osquery-extension_lib"],
goarch = "arm64",
goos = "linux",
visibility = ["//visibility:public"],
)