-
Notifications
You must be signed in to change notification settings - Fork 38
/
BUILD.bazel
100 lines (89 loc) · 2.67 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
load("@gazelle//:def.bzl", "gazelle")
load("@npm//:defs.bzl", "npm_link_all_packages")
load("@rules_go//go:def.bzl", "TOOLS_NOGO", "nogo")
load("@rules_pkg//pkg:mappings.bzl", "pkg_filegroup", "pkg_files")
load("@rules_pkg//pkg:pkg.bzl", "pkg_zip")
# Force Gazelle to choose the correct target when there are multiple go_library
# targets in a single package.
# gazelle:resolve go github.com/google/chrome-ssh-agent/go/agentport //go/agentport
# gazelle:resolve go github.com/google/chrome-ssh-agent/go/chrome //go/chrome
# gazelle:resolve go github.com/google/chrome-ssh-agent/go/dom //go/dom
# gazelle:resolve go github.com/google/chrome-ssh-agent/go/jsutil //go/jsutil
# gazelle:resolve go github.com/google/chrome-ssh-agent/go/keys //go/keys
# gazelle:resolve go github.com/google/chrome-ssh-agent/go/message //go/message
# gazelle:resolve go github.com/google/chrome-ssh-agent/go/message/fakes //go/message/fakes
# gazelle:resolve go github.com/google/chrome-ssh-agent/go/optionsui //go/optionsui
# gazelle:resolve go github.com/google/chrome-ssh-agent/go/storage //go/storage
# gazelle:resolve go github.com/google/chrome-ssh-agent/go/storage/testing //go/storage/testing
# gazelle:resolve go github.com/google/chrome-ssh-agent/go/testutil //go/testutil
gazelle(
name = "gazelle",
command = "fix",
)
nogo(
name = "chrome_ssh_agent_nogo",
config = ":nogo-config.json",
visibility = ["//visibility:public"],
deps = TOOLS_NOGO + [
# Prohibit build tags (e.g., //go:build ... ) within tests, as these may
# cause tests to silently be skipped unless we are extremely careful.
"//nogo/testbuildtags",
],
)
exports_files([
"go.mod",
"go.sum",
"package.json",
"package-lock.json",
])
npm_link_all_packages(name = "node_modules")
pkg_files(
name = "pkg_doc",
srcs = [
":CONTRIBUTING.md",
":LICENSE",
":README.md",
],
)
pkg_filegroup(
name = "pkg_common",
srcs = [
":pkg_doc",
"//go/background:pkg",
"//go/options:pkg",
"//html:pkg",
"//img:pkg",
],
)
pkg_files(
name = "pkg_manifest",
srcs = [
":manifest.json",
],
)
pkg_files(
name = "pkg_manifest_beta",
srcs = [
":manifest-beta.json",
],
# Manifest must end up with well-known name.
renames = {
"manifest-beta.json": "manifest.json",
},
)
pkg_zip(
name = "chrome-ssh-agent",
srcs = [
":pkg_common",
":pkg_manifest",
],
visibility = ["//visibility:public"],
)
pkg_zip(
name = "chrome-ssh-agent-beta",
srcs = [
":pkg_common",
":pkg_manifest_beta",
],
visibility = ["//visibility:public"],
)