-
Notifications
You must be signed in to change notification settings - Fork 0
/
BUILD
38 lines (33 loc) · 819 Bytes
/
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
load("@rules_go//go:def.bzl", "go_library", "go_binary")
package(default_visibility = ["//visibility:public"])
genrule(
name = "bot_api_docs",
outs = ["api.html"],
cmd = "curl https://core.telegram.org/bots/api > \"$@\"",
visibility = ["//visibility:private"],
)
genrule(
name = "telegram_types",
srcs = [":bot_api_docs"],
outs = ["telegram_types.go"],
cmd = "python $(location scripts/fetch_types.py) $(location //:bot_api_docs) > \"$@\"",
tools = ["scripts/fetch_types.py"],
visibility = ["//visibility:private"],
)
go_library(
name = "telegram_bot",
srcs = [
"bot.go",
":telegram_types",
],
importpath = "github.com/lanseg/tgbot",
)
go_binary(
name = "main",
srcs = [
"main.go",
],
deps = [
":telegram_bot",
],
)