Skip to content

Commit 1ada7b8

Browse files
authored
Add tag-repo make target (#254)
1 parent c97f41b commit 1ada7b8

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

Makefile

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ presubmit: checklicense misspell lint
2323
# Updating OTel Components
2424
##########################
2525

26-
OTEL_VERSION = v0.121.0
27-
OTEL_CONTRIB_VERSION = v0.121.0
26+
OTEL_VERSION ?= v0.121.0
27+
OTEL_CONTRIB_VERSION ?= v0.121.0
2828

2929
.PHONY: update-otel-components
3030
update-otel-components: export OTEL_VERSION := $(OTEL_VERSION)
@@ -44,6 +44,14 @@ update-otel-components-deps:
4444
generate-components:
4545
PATH="$(TOOLS_DIR):${PATH}" TARGET="generate" $(MAKE) target-all-otel-components
4646

47+
# This target will tag the git repo using the OTel version. Eventually this may be
48+
# more sophisticated if we want to supply separate tags for every subcomponent. For
49+
# now it is pretty simply.
50+
.PHONY: tag-repo
51+
tag-repo:
52+
git tag -a $(OTEL_VERSION) -m "Update to OpenTelemetry Collector version $(OTEL_VERSION)"
53+
@echo "Created git tag $(OTEL_VERSION). If it looks good, push it to the remote by running:\ngit push origin $(OTEL_VERSION)"
54+
4755
###################
4856
# Distro Generation
4957
###################

0 commit comments

Comments
 (0)