forked from jakevoytko/crbot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
BUILD.bazel
53 lines (47 loc) · 1.47 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
load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library")
load("@io_bazel_rules_docker//container:image.bzl", "container_image")
load("@io_bazel_rules_docker//container:container.bzl", "container_bundle")
load("@io_bazel_rules_docker//go:image.bzl", "go_image")
load("@bazel_gazelle//:def.bzl", "gazelle")
# gazelle:prefix github.com/jakevoytko/crbot
gazelle(name = "gazelle")
go_library(
name = "go_default_library",
srcs = ["crbot.go"],
importpath = "github.com/jakevoytko/crbot",
visibility = ["//visibility:public"],
deps = [
"//api:go_default_library",
"//app:go_default_library",
"//config:go_default_library",
"//log:go_default_library",
"//model:go_default_library",
"@com_github_bwmarrin_discordgo//:go_default_library",
"@com_github_go_redis_redis_v8//:go_default_library",
"@com_github_jakevoytko_go_stringmap//:go_default_library",
],
)
go_binary(
name = "crbot",
data = ["secret.json"],
embed = [":go_default_library"],
visibility = ["//visibility:public"],
)
container_image(
name = "secret_image",
base = "@go_image_base//image",
files = ["secret.json"],
)
go_image(
name = "crbot_image",
base = ":secret_image",
embed = [":go_default_library"],
visibility = ["//visibility:public"],
)
container_bundle(
name = "deploy_bundle",
images = {
"bazel:secret_image": ":secret_image",
"bazel:crbot_image": ":crbot_image",
},
)