Skip to content

Commit

Permalink
Replace manually adding tags with multimod
Browse files Browse the repository at this point in the history
Signed-off-by: Bogdan <[email protected]>
  • Loading branch information
bogdandrutu committed Oct 12, 2022
1 parent aa78209 commit e191fad
Showing 1 changed file with 6 additions and 29 deletions.
35 changes: 6 additions & 29 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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 [email protected]:open-telemetry/opentelemetry-collector.git ${TAG}
@set -e; for dir in $(ALL_MODULES); do \
(echo Pushing tag "$${dir:2}/$${TAG}" && \
git push [email protected]: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
Expand Down

0 comments on commit e191fad

Please sign in to comment.