Skip to content

Commit

Permalink
Replace manually adding tags with multimod (#16559)
Browse files Browse the repository at this point in the history
Signed-off-by: Bogdan Drutu <[email protected]>

Signed-off-by: Bogdan Drutu <[email protected]>
  • Loading branch information
bogdandrutu authored Dec 1, 2022
1 parent c6977ca commit d137d9c
Showing 1 changed file with 10 additions and 29 deletions.
39 changes: 10 additions & 29 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -120,35 +120,16 @@ for-all:
$${CMD} ); \
done

.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 $(NONROOT_MODS); 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-contrib.git ${TAG}
@set -e; for dir in $(NONROOT_MODS); do \
(echo Pushing tag "$${dir:2}/$${TAG}" && \
git push [email protected]:open-telemetry/opentelemetry-collector-contrib.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 $(NONROOT_MODS); do \
(echo Deleting tag "$${dir:2}/$${TAG}" && \
git tag -d "$${dir:2}/$${TAG}" ); \
done
COMMIT?=HEAD
MODSET?=contrib-core
REMOTE?[email protected]:open-telemetry/opentelemetry-collector-contrib.git
.PHONY: push-tags
push-tags:
multimod verify
set -e; for tag in `multimod tag -m ${MODSET} -c ${COMMIT} --print-tags | grep -v "Using" `; do \
echo "pushing tag $${tag}"; \
git push ${REMOTE} $${tag}; \
done;

DEPENDABOT_PATH=".github/dependabot.yml"
.PHONY: gendependabot
Expand Down

0 comments on commit d137d9c

Please sign in to comment.