Protocol Buffers - Google's data interchange format (grpc依赖)
https://developers.google.com/protocol-buffers/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
57 lines
1.2 KiB
57 lines
1.2 KiB
2 years ago
|
load("@rules_pkg//:mappings.bzl", "pkg_files", "strip_prefix")
|
||
|
load("//build_defs:internal_shell.bzl", "inline_sh_test")
|
||
|
load("//:protobuf.bzl", "internal_ruby_proto_library")
|
||
|
|
||
|
filegroup(
|
||
|
name = "tests",
|
||
|
srcs = glob(["tests/*.rb"]),
|
||
|
)
|
||
|
|
||
|
filegroup(
|
||
|
name = "test_protos",
|
||
|
srcs = glob(["tests/*.proto"]),
|
||
|
)
|
||
|
|
||
|
internal_ruby_proto_library(
|
||
|
name = "test_ruby_protos",
|
||
|
srcs = [":test_protos"],
|
||
|
includes = ["."],
|
||
|
)
|
||
|
|
||
|
inline_sh_test(
|
||
|
name = "test",
|
||
|
srcs = [
|
||
|
"Rakefile",
|
||
|
],
|
||
|
deps = [
|
||
|
":test_ruby_protos",
|
||
|
":tests",
|
||
|
"//:well_known_ruby_protos",
|
||
|
"//ruby:protobuf",
|
||
|
],
|
||
|
cmd = """
|
||
|
pushd `dirname $(location Rakefile)`
|
||
|
RUBYLIB=.:tests:../../lib:../../../src BAZEL=true rake test
|
||
|
popd
|
||
|
""",
|
||
|
)
|
||
|
|
||
|
################################################################################
|
||
|
# Distribution files
|
||
|
############################################################################
|
||
|
|
||
|
pkg_files(
|
||
|
name = "dist_files",
|
||
|
srcs = glob([
|
||
|
"**/*.rb",
|
||
|
"**/*.proto"
|
||
|
]) + [
|
||
|
"BUILD.bazel",
|
||
|
"Rakefile",
|
||
|
"README.md",
|
||
|
"test.sh",
|
||
|
],
|
||
|
strip_prefix = strip_prefix.from_root(""),
|
||
|
visibility = ["//pkg:__pkg__"],
|
||
|
)
|