Skip to content

Commit e2547a5

Browse files
mowiesjriguera
authored andcommitted
[chore] add remove-toolchain make cmd (open-telemetry#35490)
**Description:** <Describe what has changed.> <!--Ex. Fixing a bug - Describe the bug and how this fixes the issue. Ex. Adding a feature - Explain what this achieves.--> This PR adds a new `remove-toolchain` make command which removes the `toolchain` directive from all go.mod files. The new make command is also added to the `update-otel` make target. **Link to tracking Issue:** <Issue number if applicable> - fixes open-telemetry#33600 - could potentially also work for open-telemetry#35160 **Testing:** <Describe what testing was performed and which tests were added.> - add a `toolchain go1.22.5` directive to any of the go.mod files in this repo - call `make remove-toolchain` - check if the toolchain directive was removed --------- Signed-off-by: Moritz Wiesinger <[email protected]>
1 parent fb9899e commit e2547a5

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

Makefile

+6-1
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,10 @@ gogci:
118118
gotidy:
119119
$(MAKE) $(FOR_GROUP_TARGET) TARGET="tidy"
120120

121+
.PHONY: remove-toolchain
122+
remove-toolchain:
123+
$(MAKE) $(FOR_GROUP_TARGET) TARGET="toolchain"
124+
121125
.PHONY: gomoddownload
122126
gomoddownload:
123127
$(MAKE) $(FOR_GROUP_TARGET) TARGET="moddownload"
@@ -404,11 +408,12 @@ update-otel:$(MULTIMOD)
404408
$(MULTIMOD) sync -s=true -o ../opentelemetry-collector -m beta --commit-hash $(OTEL_VERSION)
405409
git add . && git commit -s -m "[chore] multimod update beta modules" ; \
406410
$(MAKE) gotidy
407-
$(call updatehelper,$(CORE_VERSIONS),$(GOMOD),./cmd/otelcontribcol/builder-config.yaml)
411+
$(call updatehelper,$(CORE_VERSIONS),$(GOMOD),./cmd/otelcontribcol/builder-config.yaml)
408412
$(call updatehelper,$(CORE_VERSIONS),$(GOMOD),./cmd/oteltestbedcol/builder-config.yaml)
409413
$(MAKE) genotelcontribcol
410414
$(MAKE) genoteltestbedcol
411415
$(MAKE) oteltestbedcol
416+
$(MAKE) remove-toolchain
412417

413418
.PHONY: otel-from-tree
414419
otel-from-tree:

Makefile.Common

+4
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,10 @@ tidy:
211211
rm -fr go.sum
212212
$(GOCMD) mod tidy -compat=1.22.0
213213

214+
.PHONY: toolchain
215+
toolchain:
216+
$(GOCMD) get toolchain@none
217+
214218
.PHONY: misspell
215219
misspell: $(TOOLS_BIN_DIR)/misspell
216220
@echo "running $(MISSPELL)"

exporter/dorisexporter/go.mod

-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/exporter/dorise
22

33
go 1.22.0
44

5-
toolchain go1.22.7
6-
75
require (
86
github.com/cenkalti/backoff/v4 v4.3.0
97
// cannot use higher version: https://github.com/go-sql-driver/mysql/issues/1602

0 commit comments

Comments
 (0)