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

21 lines
1007 B
Makefile

DEVP_DEVPTOOL_VERSION = v${DEVP_VERSION}
DEVP_DEVPTOOL_DIR = ${DEVP_TOOLS_ROOT}/devp/${DEVP_DEVPTOOL_VERSION}
DEVP_DEVPTOOL_EXE = ${DEVP_DEVPTOOL_DIR}/devp
${DEVP_DEVPTOOL_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,"[devp] is expected to be installed but it is not. Please contact /duty golang for support.")
@exit 1
endif
$(Q) mkdir -p ${DEVP_DEVPTOOL_DIR}
$(Q) CGO_ENABLED=0 GOBIN=${DEVP_DEVPTOOL_DIR} go install git.mws-team.ru/mws/devp/platform-go-tools/cmd/devp@${DEVP_DEVPTOOL_VERSION}
$(call green,"devp installed as $@")
.PHONY: devp/install/devp
devp/install/devp: ${DEVP_DEVPTOOL_EXE}
@# Install devp - v${DEVP_VERSION}