Skip to content

Commit

Permalink
Add update-all-otel-deps target in Makefile (#5434)
Browse files Browse the repository at this point in the history
* Add update-all-otel-deps target in Makefile

* Update indirect otel dependencies as well
  • Loading branch information
XSAM committed May 2, 2024
1 parent c44d632 commit 4293f19
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions Makefile
Expand Up @@ -287,6 +287,17 @@ add-tags: | $(MULTIMOD)
@[ "${MODSET}" ] || ( echo ">> env var MODSET is not set"; exit 1 )
$(MULTIMOD) verify && $(MULTIMOD) tag -m ${MODSET} -c ${COMMIT}

.PHONY: update-all-otel-deps
update-all-otel-deps:
@[ "${GITSHA}" ] || ( echo ">> env var GITSHA is not set"; exit 1 )
@echo "Updating OpenTelemetry dependencies to ${GITSHA}"
@set -e; \
for dir in $(OTEL_GO_MOD_DIRS); do \
echo "Updating OpenTelemetry dependencies in $${dir}"; \
(cd $${dir} \
&& grep -o 'go.opentelemetry.io/otel\S*' go.mod | xargs -I {} -n1 $(GO) get {}@${GITSHA}); \
done

# The source directory for opentelemetry-configuration schema.
OPENTELEMETRY_CONFIGURATION_JSONSCHEMA_SRC_DIR=tmp/opentelememetry-configuration

Expand Down

0 comments on commit 4293f19

Please sign in to comment.