diff --git a/mixerclient/repositories.bzl b/mixerclient/repositories.bzl index a272f29d1ff4..30f07b3badc2 100644 --- a/mixerclient/repositories.bzl +++ b/mixerclient/repositories.bzl @@ -456,7 +456,66 @@ cc_proto_library( actual = "@googleapis_git//:cloud_trace", ) +def gogoproto_repositories(bind=True): + BUILD = """ +# Copyright 2016 Google Inc. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +################################################################################ +# + +licenses(["notice"]) + +load("@protobuf_git//:protobuf.bzl", "cc_proto_library") + +exports_files(glob(["google/**"])) + +cc_proto_library( + name = "cc_gogoproto", + srcs = [ + "gogoproto/gogo.proto", + ], + include = ".", + default_runtime = "//external:protobuf", + protoc = "//external:protoc", + visibility = ["//visibility:public"], + deps = [ + "//external:cc_wkt_protos", + ], +) +""" + native.new_git_repository( + name = "gogoproto_git", + commit = "100ba4e885062801d56799d78530b73b178a78f3", + remote = "https://github.com/gogo/protobuf", + build_file_content = BUILD, + ) + + if bind: + native.bind( + name = "cc_gogoproto", + actual = "@gogoproto_git//:cc_gogoproto", + ) + + native.bind( + name = "cc_gogoproto_genproto", + actual = "@gogoproto_git//:cc_gogoproto_genproto", + ) + def mixerapi_repositories(protobuf_repo="@protobuf_git//", bind=True): + gogoproto_repositories(bind) + BUILD = """ # Copyright 2016 Google Inc. All Rights Reserved. # @@ -489,6 +548,7 @@ cc_proto_library( visibility = ["//visibility:public"], deps = [ "//external:cc_wkt_protos", + "//external:cc_gogoproto", "//external:servicecontrol", ], ) @@ -496,7 +556,7 @@ cc_proto_library( native.new_git_repository( name = "mixerapi_git", - commit = "f921098f6d62cb3316eee1932f3b405bcaa88cf6", + commit = "2cb09827d7f09a6e88eac2c2249dcb45c5419f09", remote = "https://github.com/istio/api.git", build_file_content = BUILD, )