Skip to content

Commit

Permalink
Update to latest mixer api with gogoproto (envoyproxy#43)
Browse files Browse the repository at this point in the history
  • Loading branch information
qiwzhang authored Mar 17, 2017
1 parent 937b418 commit c043b22
Showing 1 changed file with 61 additions and 1 deletion.
62 changes: 61 additions & 1 deletion mixerclient/repositories.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -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.
#
Expand Down Expand Up @@ -489,14 +548,15 @@ cc_proto_library(
visibility = ["//visibility:public"],
deps = [
"//external:cc_wkt_protos",
"//external:cc_gogoproto",
"//external:servicecontrol",
],
)
""".format(protobuf_repo)

native.new_git_repository(
name = "mixerapi_git",
commit = "f921098f6d62cb3316eee1932f3b405bcaa88cf6",
commit = "2cb09827d7f09a6e88eac2c2249dcb45c5419f09",
remote = "https://github.com/istio/api.git",
build_file_content = BUILD,
)
Expand Down

0 comments on commit c043b22

Please sign in to comment.