23 lines
1.2 KiB
Makefile
23 lines
1.2 KiB
Makefile
DEVP_PROTOC_GEN_GO_VERSION = v1.36.10
|
|
DEVP_PROTOC_GEN_GO_DIR = ${DEVP_TOOLS_ROOT}/protoc-gen-go/${DEVP_PROTOC_GEN_GO_VERSION}
|
|
DEVP_PROTOC_GEN_GO_EXE = ${DEVP_PROTOC_GEN_GO_DIR}/protoc-gen-go
|
|
|
|
${DEVP_PROTOC_GEN_GO_EXE}:
|
|
ifdef DEVP_NO_INSTALL
|
|
ifneq ($(DEVP_VERSION),$(DEVP_CI_BUILDER_VERSION))
|
|
$(call error_message,"Platform version is [${DEVP_VERSION}] image version is [${DEVP_CI_BUILDER_VERSION}]. Same version is expected. Updating with [make devp/update] might help. DEVP_NO_INSTALL == 1. See: https://mws.pages.mws-team.ru/devp/platform-go-tools/pgt/user/pages/platform-update.html")
|
|
@exit 1
|
|
endif
|
|
$(call error_message,"[protoc-gen-go] is expected to be installed but it is not. Please contact /duty golang for support.")
|
|
@exit 1
|
|
endif
|
|
$(Q) mkdir -p ${DEVP_PROTOC_GEN_GO_DIR}
|
|
$(Q) CGO_ENABLED=0 GOBIN=${DEVP_PROTOC_GEN_GO_DIR} go install google.golang.org/protobuf/cmd/protoc-gen-go@${DEVP_PROTOC_GEN_GO_VERSION}
|
|
$(call green,"protoc-gen-go installed as $@")
|
|
|
|
.PHONY: devp/install/protoc-gen-go
|
|
devp/install/protoc-gen-go: ${DEVP_PROTOC_GEN_GO_EXE}
|
|
@# Install protoc-gen-go - v1.36.10
|
|
|
|
DEVP_PROTOC_GO_CMD := ${DEVP_PROTOC_CMD} --plugin=protoc-gen-go=${DEVP_PROTOC_GEN_GO_EXE}
|