...
1load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
2
3go_library(
4 name = "version",
5 srcs = ["version.go"],
6 importpath = "edge-infra.dev/pkg/lib/runtime/version",
7 visibility = ["//visibility:public"],
8 x_defs = {
9 "semver": "{STABLE_APP_SEMVER}",
10 "commit": "{STABLE_APP_GIT_COMMIT}",
11 "rc": "{STABLE_APP_RELEASE_CANDIDATE}",
12 "timestamp": "{STABLE_APP_GIT_TIMESTAMP}",
13 },
14 deps = [
15 "//:edge-infra.dev",
16 "//pkg/lib/build",
17 ],
18)
19
20go_test(
21 name = "version_test",
22 srcs = ["version_test.go"],
23 embed = [":version"],
24 deps = [
25 "//pkg/lib/build",
26 "@tools_gotest_v3//assert",
27 "@tools_gotest_v3//assert/cmp",
28 ],
29)
View as plain text