learning_go/rbd_exporter/scripts/devp/install/gocover-cobertura.gen.mk
2025-12-23 06:40:56 +03:00

23 lines
1.2 KiB
Makefile

DEVP_GOCOVER_COBERTURA_VERSION = v1.4.0
DEVP_GOCOVER_COBERTURA_DIR = ${DEVP_TOOLS_ROOT}/gocover-cobertura/${DEVP_GOCOVER_COBERTURA_VERSION}
DEVP_GOCOVER_COBERTURA_EXE = ${DEVP_GOCOVER_COBERTURA_DIR}/gocover-cobertura
${DEVP_GOCOVER_COBERTURA_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,"[gocover-cobertura] is expected to be installed but it is not. Please contact /duty golang for support.")
@exit 1
endif
$(Q) mkdir -p ${DEVP_GOCOVER_COBERTURA_DIR}
$(Q) CGO_ENABLED=0 GOBIN=${DEVP_GOCOVER_COBERTURA_DIR} go install github.com/boumenot/gocover-cobertura@${DEVP_GOCOVER_COBERTURA_VERSION}
$(call green,"gocover-cobertura installed as $@")
.PHONY: devp/install/gocover-cobertura
devp/install/gocover-cobertura: ${DEVP_GOCOVER_COBERTURA_EXE}
@# Install gocover-cobertura - v1.4.0
DEVP_COBERTURA := ${DEVP_BUILD}/cobertura