-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathBUILD
79 lines (72 loc) · 1.54 KB
/
BUILD
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
package(default_visibility = ["//visibility:public"])
load("@bazel_gazelle//:def.bzl", "gazelle")
load(
"@io_bazel_rules_docker//container:container.bzl",
"container_bundle",
"container_image",
"container_push",
)
gazelle(
name = "gazelle",
prefix = "github.com/f0rmiga/sessiongate",
)
cc_library(
name = "sessiongate",
srcs = [
"src/end.c",
"src/expire.c",
"src/module.c",
"src/pdel.c",
"src/pget.c",
"src/pset.c",
"src/start.c",
"src/utils.c",
],
hdrs = [
"src/consts.h",
"src/end.h",
"src/expire.h",
"src/pdel.h",
"src/pget.h",
"src/pset.h",
"src/start.h",
"src/utils.h",
],
copts = ["-std=c11"],
deps = [
"@libsodium//:sodium",
"@redis_modules_sdk//:redis_modules_sdk",
],
alwayslink = 1,
)
cc_binary(
name = "sessiongate.so",
linkshared = True,
deps = [
":sessiongate",
],
)
container_image(
name = "_sessiongate_image",
base = "@redis//image",
files = [":sessiongate.so"],
cmd = [
"redis-server",
"--loadmodule",
"/sessiongate.so",
],
)
container_bundle(
name = "sessiongate_image",
images = {
"thulioassis/sessiongate:latest": ":_sessiongate_image",
},
)
container_push(
name = "push_sessiongate_image",
image = ":_sessiongate_image",
format = "Docker",
registry = "index.docker.io",
repository = "thulioassis/sessiongate",
tag = "latest",
)