Add protoc-gen-swagger proto options to includes.
@@ -442,6 +442,27 @@ endif
mv $(TOOLCHAIN_DIR)/temp-golangci/golangci-lint$(EXE_EXTENSION) $(TOOLCHAIN_BIN)/golangci-lint$(EXE_EXTENSION)
rm -rf $(TOOLCHAIN_DIR)/temp-golangci/
+build/toolchain/include/google/api/:
+ mkdir -p $(TOOLCHAIN_DIR)/googleapis-temp/
+ mkdir -p $(TOOLCHAIN_BIN)
+ curl -o $(TOOLCHAIN_DIR)/googleapis-temp/googleapis.zip -L \
+ https://github.com/googleapis/googleapis/archive/master.zip
+ (cd $(TOOLCHAIN_DIR)/googleapis-temp/; unzip -q -o googleapis.zip)
+ cp -rf $(TOOLCHAIN_DIR)/googleapis-temp/googleapis-master/google/api/ \
+ $(PROTOC_INCLUDES)/google/api
+ rm -rf $(TOOLCHAIN_DIR)/googleapis-temp
+
+build/toolchain/include/protoc-gen-swagger/:
+ mkdir -p $(TOOLCHAIN_DIR)/grpc-gateway-temp/
+ mkdir -p $(TOOLCHAIN_BIN)
+ mkdir -p $(PROTOC_INCLUDES)/protoc-gen-swagger/options/
+ curl -o $(TOOLCHAIN_DIR)/grpc-gateway-temp/grpc-gateway.zip -L \
+ https://github.com/grpc-ecosystem/grpc-gateway/archive/master.zip
+ (cd $(TOOLCHAIN_DIR)/grpc-gateway-temp/; unzip -q -o grpc-gateway.zip)
+ cp -rf $(TOOLCHAIN_DIR)/grpc-gateway-temp/grpc-gateway-master/protoc-gen-swagger/options/*.proto \
+ $(PROTOC_INCLUDES)/protoc-gen-swagger/options/
+ rm -rf $(TOOLCHAIN_DIR)/grpc-gateway-temp
+
build/toolchain/bin/protoc$(EXE_EXTENSION):
mkdir -p $(TOOLCHAIN_BIN)
curl -o $(TOOLCHAIN_DIR)/protoc-temp.zip -L $(PROTOC_PACKAGE)
@@ -452,18 +473,10 @@ build/toolchain/bin/protoc-gen-go$(EXE_EXTENSION):
mkdir -p $(TOOLCHAIN_BIN)
cd $(TOOLCHAIN_BIN) && $(GO) build -pkgdir . github.com/golang/protobuf/protoc-gen-go
-build/toolchain/bin/protoc-gen-grpc-gateway$(EXE_EXTENSION):
- mkdir -p $(TOOLCHAIN_DIR)/googleapis-temp/
- mkdir -p $(TOOLCHAIN_BIN)
- curl -o $(TOOLCHAIN_DIR)/googleapis-temp/googleapis.zip -L \
- https://github.com/googleapis/googleapis/archive/master.zip
- (cd $(TOOLCHAIN_DIR)/googleapis-temp/; unzip -q -o googleapis.zip)
- cp -rf $(TOOLCHAIN_DIR)/googleapis-temp/googleapis-master/google/api/ \
- $(PROTOC_INCLUDES)/google/api
- rm -rf $(TOOLCHAIN_DIR)/googleapis-temp
+build/toolchain/bin/protoc-gen-grpc-gateway$(EXE_EXTENSION): build/toolchain/include/google/api/
cd $(TOOLCHAIN_BIN) && $(GO) build -pkgdir . github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway
-build/toolchain/bin/protoc-gen-swagger$(EXE_EXTENSION):
+build/toolchain/bin/protoc-gen-swagger$(EXE_EXTENSION): build/toolchain/include/google/api/ build/toolchain/include/protoc-gen-swagger/
mkdir -p $(TOOLCHAIN_BIN)
cd $(TOOLCHAIN_BIN) && $(GO) build -pkgdir . github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger
