Squashed 'libs/protobuf/' content from commit fcd3b9a85

git-subtree-dir: libs/protobuf
git-subtree-split: fcd3b9a85ef36e46643dc30176cea1a7ad62e02b
This commit is contained in:
Henry Winkel
2022-10-22 14:46:58 +02:00
commit 36bca61764
2186 changed files with 838730 additions and 0 deletions

View File

@@ -0,0 +1,56 @@
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__"],
)