lujiajing1126 commented on a change in pull request #24: URL: https://github.com/apache/skywalking-banyandb/pull/24#discussion_r676543921
########## File path: api/buf.yaml ########## @@ -0,0 +1,32 @@ +# +# Licensed to Apache Software Foundation (ASF) under one or more contributor +# license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright +# ownership. Apache Software Foundation (ASF) licenses this file to you 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. +# + +version: v1beta1 +build: + roots: + - ./proto +lint: + use: + - DEFAULT + except: + - RPC_REQUEST_STANDARD_NAME Review comment: As I asked in the last PR #23 , do we need to impose these two rules? ########## File path: scripts/build/base.mk ########## @@ -0,0 +1,87 @@ +# Licensed to Apache Software Foundation (ASF) under one or more contributor +# license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright +# ownership. Apache Software Foundation (ASF) licenses this file to you 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. +# + +mk_path := $(abspath $(lastword $(MAKEFILE_LIST))) +mk_dir := $(dir $(mk_path)) +root_dir := $(mk_dir)../.. +tool_bin := $(root_dir)/bin +tool_include := "$(root_dir)/include" +uname_os := $(shell uname -s) +uname_arch := $(shell uname -m) + +protoc_version ?= 3.17.3 + +# There are no protobuf releases for Darwin ARM so for +# now we always use the x86_64 release through Rosetta. +ifeq ($(uname_os),Darwin) +protoc_os := osx +protoc_arch := x86_64 +endif +ifeq ($(uname_os),Linux) +protoc_os = linux +protoc_arch := $(uname_arch) +endif + + +## Tools + +PROTOC := $(tool_bin)/protoc +$(PROTOC): + @echo "Install protoc..." + @if ! command -v curl >/dev/null 2>/dev/null; then echo "error: curl must be installed" >&2; exit 1; fi + @if ! command -v unzip >/dev/null 2>/dev/null; then echo "error: unzip must be installed" >&2; exit 1; fi + @rm -f $(tool_bin)/protoc + @rm -rf $(tool_include)/google + @mkdir -p $(tool_bin) $(tool_include) + $(eval protoc_tmp := $(shell mktemp -d)) + cd $(protoc_tmp); curl -sSL https://github.com/protocolbuffers/protobuf/releases/download/v$(protoc_version)/protoc-$(protoc_version)-$(protoc_os)-$(protoc_arch).zip -o protoc.zip Review comment: Just a comment: this cannot work on osx-arm64 platform, i.e. Apple Chip. (Unfortunately, I changed my working laptop last week....🤣) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
