From e191fadfa5f7b5d8e57174b6c126bd5394c04e46 Mon Sep 17 00:00:00 2001 From: Bogdan Date: Wed, 12 Oct 2022 13:40:20 -0700 Subject: [PATCH] Replace manually adding tags with multimod Signed-off-by: Bogdan --- Makefile | 35 ++++++----------------------------- 1 file changed, 6 insertions(+), 29 deletions(-) diff --git a/Makefile b/Makefile index 222e1d9131d..25c90123ee0 100644 --- a/Makefile +++ b/Makefile @@ -164,35 +164,12 @@ ifndef COMPONENT $(error COMPONENT variable was not defined) endif -.PHONY: add-tag -add-tag: - @[ "${TAG}" ] || ( echo ">> env var TAG is not set"; exit 1 ) - @echo "Adding tag ${TAG}" - @git tag -a ${TAG} -s -m "Version ${TAG}" - @set -e; for dir in $(ALL_MODULES); do \ - (echo Adding tag "$${dir:2}/$${TAG}" && \ - git tag -a "$${dir:2}/$${TAG}" -s -m "Version ${dir:2}/${TAG}" ); \ - done - -.PHONY: push-tag -push-tag: - @[ "${TAG}" ] || ( echo ">> env var TAG is not set"; exit 1 ) - @echo "Pushing tag ${TAG}" - @git push git@github.com:open-telemetry/opentelemetry-collector.git ${TAG} - @set -e; for dir in $(ALL_MODULES); do \ - (echo Pushing tag "$${dir:2}/$${TAG}" && \ - git push git@github.com:open-telemetry/opentelemetry-collector.git "$${dir:2}/$${TAG}"); \ - done - -.PHONY: delete-tag -delete-tag: - @[ "${TAG}" ] || ( echo ">> env var TAG is not set"; exit 1 ) - @echo "Deleting tag ${TAG}" - @git tag -d ${TAG} - @set -e; for dir in $(ALL_MODULES); do \ - (echo Deleting tag "$${dir:2}/$${TAG}" && \ - git tag -d "$${dir:2}/$${TAG}" ); \ - done +MODSET ?= collector-core +COMMIT ?= "HEAD" +.PHONY: add-tags +add-tags: + @[ "${MODSET}" ] || ( echo ">> env var MODSET is not set"; exit 1 ) + multimod verify && multimod tag -m ${MODSET} -c ${COMMIT} # Build the Collector executable. .PHONY: otelcorecol