File tree 1 file changed +13
-10
lines changed
1 file changed +13
-10
lines changed Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
source " $( dirname " ${BASH_SOURCE} " ) /lib/init.sh"
3
3
4
- if ! os::util::find::system_binary ' protoc' || [[ " $( protoc --version) " != " libprotoc 3.0." * ]]; then
5
- echo " Generating protobuf requires protoc 3.0.x. Please download and"
6
- echo " install the platform appropriate Protobuf package for your OS: "
7
- echo
8
- echo " https://github.com/google/protobuf/releases"
9
- echo
10
- if [[ " ${PROTO_OPTIONAL:- } " == " 1" ]]; then
11
- exit 0
12
- fi
13
- exit 1
4
+ if [[ " ${PROTO_OPTIONAL:- } " == " 1" ]]; then
5
+ os::log::warn " Skipping protobuf generation as \$ PROTO_OPTIONAL is set."
6
+ exit 0
7
+ fi
8
+
9
+ os::util::ensure::system_binary_exists ' protoc'
10
+ if [[ " $( protoc --version) " != " libprotoc 3.0." * ]]; then
11
+ os::log::fatal " Generating protobuf requires protoc 3.0.x. Please download and
12
+ install the platform appropriate Protobuf package for your OS:
13
+
14
+ https://github.com/google/protobuf/releases
15
+
16
+ To skip protobuf generation, set \$ PROTO_OPTIONAL."
14
17
fi
15
18
16
19
os::util::ensure::gopath_binary_exists ' goimports'
You can’t perform that action at this time.
0 commit comments