You've already forked opentelemetry-go
mirror of
https://github.com/open-telemetry/opentelemetry-go.git
synced 2025-07-17 01:12:45 +02:00
Add gorelease Make target (#4431)
* Add gorelease Make target * Igonre exit code and add blank line * Add GORELEASE to tools * Apply suggestions from code review Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com> * Update RELEASING.md * Run go mod tidy --------- Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com> Co-authored-by: Tyler Yahn <codingalias@gmail.com>
This commit is contained in:
14
Makefile
14
Makefile
@ -74,8 +74,11 @@ $(TOOLS)/gojq: PACKAGE=github.com/itchyny/gojq/cmd/gojq
|
|||||||
GOTMPL = $(TOOLS)/gotmpl
|
GOTMPL = $(TOOLS)/gotmpl
|
||||||
$(GOTMPL): PACKAGE=go.opentelemetry.io/build-tools/gotmpl
|
$(GOTMPL): PACKAGE=go.opentelemetry.io/build-tools/gotmpl
|
||||||
|
|
||||||
|
GORELEASE = $(TOOLS)/gorelease
|
||||||
|
$(GORELEASE): PACKAGE=golang.org/x/exp/cmd/gorelease
|
||||||
|
|
||||||
.PHONY: tools
|
.PHONY: tools
|
||||||
tools: $(CROSSLINK) $(DBOTCONF) $(GOLANGCI_LINT) $(MISSPELL) $(GOCOVMERGE) $(STRINGER) $(PORTO) $(GOJQ) $(SEMCONVGEN) $(MULTIMOD) $(SEMCONVKIT) $(GOTMPL)
|
tools: $(CROSSLINK) $(DBOTCONF) $(GOLANGCI_LINT) $(MISSPELL) $(GOCOVMERGE) $(STRINGER) $(PORTO) $(GOJQ) $(SEMCONVGEN) $(MULTIMOD) $(SEMCONVKIT) $(GOTMPL) $(GORELEASE)
|
||||||
|
|
||||||
# Virtualized python tools via docker
|
# Virtualized python tools via docker
|
||||||
|
|
||||||
@ -267,6 +270,15 @@ semconv-generate: | $(SEMCONVGEN) $(SEMCONVKIT)
|
|||||||
$(SEMCONVGEN) -i "$(OTEL_SEMCONV_REPO)/model/." --only=resource -p conventionType=resource -f resource.go -t "$(SEMCONVPKG)/template.j2" -s "$(TAG)"
|
$(SEMCONVGEN) -i "$(OTEL_SEMCONV_REPO)/model/." --only=resource -p conventionType=resource -f resource.go -t "$(SEMCONVPKG)/template.j2" -s "$(TAG)"
|
||||||
$(SEMCONVKIT) -output "$(SEMCONVPKG)/$(TAG)" -tag "$(TAG)"
|
$(SEMCONVKIT) -output "$(SEMCONVPKG)/$(TAG)" -tag "$(TAG)"
|
||||||
|
|
||||||
|
.PHONY: gorelease
|
||||||
|
gorelease: $(OTEL_GO_MOD_DIRS:%=gorelease/%)
|
||||||
|
gorelease/%: DIR=$*
|
||||||
|
gorelease/%:| $(GORELEASE)
|
||||||
|
@echo "gorelease in $(DIR):" \
|
||||||
|
&& cd $(DIR) \
|
||||||
|
&& $(GORELEASE) \
|
||||||
|
|| echo ""
|
||||||
|
|
||||||
.PHONY: prerelease
|
.PHONY: prerelease
|
||||||
prerelease: | $(MULTIMOD)
|
prerelease: | $(MULTIMOD)
|
||||||
@[ "${MODSET}" ] || ( echo ">> env var MODSET is not set"; exit 1 )
|
@[ "${MODSET}" ] || ( echo ">> env var MODSET is not set"; exit 1 )
|
||||||
|
@ -21,6 +21,12 @@ make semconv-generate # Uses the exported TAG and OTEL_SEMCONV_REPO.
|
|||||||
This should create a new sub-package of [`semconv`](./semconv).
|
This should create a new sub-package of [`semconv`](./semconv).
|
||||||
Ensure things look correct before submitting a pull request to include the addition.
|
Ensure things look correct before submitting a pull request to include the addition.
|
||||||
|
|
||||||
|
## Breaking changes validation
|
||||||
|
|
||||||
|
You can run `make gorelease` that runs [gorelease](https://pkg.go.dev/golang.org/x/exp/cmd/gorelease) to ensure that there are no unwanted changes done in the public API.
|
||||||
|
|
||||||
|
You can check/report problems with `gorelease` [here](https://golang.org/issues/26420).
|
||||||
|
|
||||||
## Pre-Release
|
## Pre-Release
|
||||||
|
|
||||||
First, decide which module sets will be released and update their versions
|
First, decide which module sets will be released and update their versions
|
||||||
|
@ -14,6 +14,7 @@ require (
|
|||||||
go.opentelemetry.io/build-tools/gotmpl v0.11.0
|
go.opentelemetry.io/build-tools/gotmpl v0.11.0
|
||||||
go.opentelemetry.io/build-tools/multimod v0.11.0
|
go.opentelemetry.io/build-tools/multimod v0.11.0
|
||||||
go.opentelemetry.io/build-tools/semconvgen v0.11.0
|
go.opentelemetry.io/build-tools/semconvgen v0.11.0
|
||||||
|
golang.org/x/exp v0.0.0-20230510235704-dd950f8aeaea
|
||||||
golang.org/x/tools v0.12.0
|
golang.org/x/tools v0.12.0
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -196,7 +197,6 @@ require (
|
|||||||
go.uber.org/multierr v1.11.0 // indirect
|
go.uber.org/multierr v1.11.0 // indirect
|
||||||
go.uber.org/zap v1.24.0 // indirect
|
go.uber.org/zap v1.24.0 // indirect
|
||||||
golang.org/x/crypto v0.12.0 // indirect
|
golang.org/x/crypto v0.12.0 // indirect
|
||||||
golang.org/x/exp v0.0.0-20230510235704-dd950f8aeaea // indirect
|
|
||||||
golang.org/x/exp/typeparams v0.0.0-20230307190834-24139beb5833 // indirect
|
golang.org/x/exp/typeparams v0.0.0-20230307190834-24139beb5833 // indirect
|
||||||
golang.org/x/mod v0.12.0 // indirect
|
golang.org/x/mod v0.12.0 // indirect
|
||||||
golang.org/x/net v0.14.0 // indirect
|
golang.org/x/net v0.14.0 // indirect
|
||||||
|
@ -29,5 +29,6 @@ import (
|
|||||||
_ "go.opentelemetry.io/build-tools/gotmpl"
|
_ "go.opentelemetry.io/build-tools/gotmpl"
|
||||||
_ "go.opentelemetry.io/build-tools/multimod"
|
_ "go.opentelemetry.io/build-tools/multimod"
|
||||||
_ "go.opentelemetry.io/build-tools/semconvgen"
|
_ "go.opentelemetry.io/build-tools/semconvgen"
|
||||||
|
_ "golang.org/x/exp/cmd/gorelease"
|
||||||
_ "golang.org/x/tools/cmd/stringer"
|
_ "golang.org/x/tools/cmd/stringer"
|
||||||
)
|
)
|
||||||
|
Reference in New Issue
Block a user