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 27, 2022
1 parent 3262fd8 commit c235dec
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 @@ -165,35 +165,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
COMMIT?=HEAD
REMOTE?=upstream
.PHONY: push-tags
push-tags: | $(MULTIMOD)
multimod tag -m beta -c ${COMMIT} -p -r ${REMOTE}
multimod tag -m stable -c ${COMMIT} -p -r ${REMOTE}

# Build the Collector executable.
.PHONY: otelcorecol
Expand Down

0 comments on commit c235dec

Please sign in to comment.