Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
P
protobuf
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
protobuf
Commits
db7c043f
Unverified
Commit
db7c043f
authored
Dec 04, 2017
by
Feng Xiao
Committed by
GitHub
Dec 04, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3968 from fahhem/patch-2
Add a check_version() for use in WORKSPACEs
parents
716acc3b
35119e39
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
0 deletions
+14
-0
WORKSPACE
examples/WORKSPACE
+2
-0
protobuf.bzl
protobuf.bzl
+12
-0
No files found.
examples/WORKSPACE
View file @
db7c043f
...
...
@@ -5,6 +5,8 @@ http_archive(
strip_prefix = "protobuf-master",
urls = ["https://github.com/google/protobuf/archive/master.zip"],
)
load("@com_google_protobuf//:protobuf.bzl", "check_protobuf_required_bazel_version")
check_protobuf_required_bazel_version()
# This com_google_protobuf_cc repository is required for cc_proto_library
# rule. It provides protobuf C++ runtime. Note that it actually is the same
...
...
protobuf.bzl
View file @
db7c043f
...
...
@@ -400,3 +400,15 @@ def internal_protobuf_py_tests(
srcs=[s],
main=s,
**kargs)
def check_protobuf_required_bazel_version():
"""
For
WORKSPACE
files
,
to
check
the
installed
version
of
bazel
.
This
ensures
bazel
supports
our
approach
to
proto_library
()
depending
on
a
copied
filegroup
.
(
Fixed
in
bazel
0.5.4
)
"""
expected = apple_common.dotted_version("
0.5.4
")
current = apple_common.dotted_version(native.bazel_version)
if current.compare_to(expected) < 0:
fail("
Bazel
must
be
newer
than
0.5.4
")
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment