Skip to content

Commit fafdfdd

Browse files
authored
[chore] switch over githubgen to the one built with our tools (#37397)
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue. Ex. Adding a feature - Explain what this achieves.--> #### Description Change the githubgen we use to the one defined in opentelemetry-go-build-tools <!-- Issue number (e.g. #1234) or full URL to issue, if applicable. --> #### Link to tracking issue See #37294
1 parent f83d88d commit fafdfdd

File tree

5 files changed

+17
-14
lines changed

5 files changed

+17
-14
lines changed

Makefile

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -310,17 +310,13 @@ generate: install-tools
310310
PATH="$$PWD/.tools:$$PATH" $(MAKE) for-all CMD="$(GOCMD) generate ./..."
311311
$(MAKE) gofmt
312312

313-
.PHONY: githubgen-install
314-
githubgen-install:
315-
cd cmd/githubgen && $(GOCMD) install .
316-
317313
.PHONY: gengithub
318-
gengithub: githubgen-install
319-
githubgen
314+
gengithub: $(GITHUBGEN)
315+
$(GITHUBGEN)
320316

321317
.PHONY: gendistributions
322-
gendistributions: githubgen-install
323-
githubgen distributions
318+
gendistributions: $(GITHUBGEN)
319+
$(GITHUBGEN) distributions
324320

325321
.PHONY: update-codeowners
326322
update-codeowners: gengithub generate
@@ -556,9 +552,8 @@ clean:
556552
find . -type f -name 'builtunitetest.test' -delete
557553

558554
.PHONY: generate-gh-issue-templates
559-
generate-gh-issue-templates:
560-
cd cmd/githubgen && $(GOCMD) install .
561-
githubgen issue-templates
555+
generate-gh-issue-templates: $(GITHUBGEN)
556+
$(GITHUBGEN) issue-templates
562557

563558
.PHONY: checks
564559
checks:

Makefile.Common

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ CHECKFILE := $(TOOLS_BIN_DIR)/checkfile
7474
CROSSLINK := $(TOOLS_BIN_DIR)/crosslink
7575
GOJUNIT := $(TOOLS_BIN_DIR)/go-junit-report
7676
BUILDER := $(TOOLS_BIN_DIR)/builder
77+
GITHUBGEN := $(TOOLS_BIN_DIR)/githubgen
7778
GOFUMPT := $(TOOLS_BIN_DIR)/gofumpt
7879
GOVULNCHECK := $(TOOLS_BIN_DIR)/govulncheck
7980
GCI := $(TOOLS_BIN_DIR)/gci

internal/tools/go.mod

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ require (
1414
go.opentelemetry.io/build-tools/checkfile v0.16.0
1515
go.opentelemetry.io/build-tools/chloggen v0.16.0
1616
go.opentelemetry.io/build-tools/crosslink v0.16.0
17+
go.opentelemetry.io/build-tools/githubgen v0.0.0-20250120111601-b29324c2a9f5
1718
go.opentelemetry.io/build-tools/issuegenerator v0.16.0
1819
go.opentelemetry.io/build-tools/multimod v0.16.0
1920
go.opentelemetry.io/collector/cmd/builder v0.118.1-0.20250121185328-fbefb22cc2b3
@@ -107,7 +108,8 @@ require (
107108
github.com/golangci/unconvert v0.0.0-20240309020433-c5143eacb3ed // indirect
108109
github.com/google/go-cmp v0.6.0 // indirect
109110
github.com/google/go-github v17.0.0+incompatible // indirect
110-
github.com/google/go-querystring v1.0.0 // indirect
111+
github.com/google/go-github/v66 v66.0.0 // indirect
112+
github.com/google/go-querystring v1.1.0 // indirect
111113
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect
112114
github.com/gordonklaus/ineffassign v0.1.0 // indirect
113115
github.com/gostaticanalysis/analysisutil v0.7.1 // indirect

internal/tools/go.sum

Lines changed: 6 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

internal/tools/tools.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ import (
2222
_ "go.opentelemetry.io/build-tools/checkfile"
2323
_ "go.opentelemetry.io/build-tools/chloggen"
2424
_ "go.opentelemetry.io/build-tools/crosslink"
25+
_ "go.opentelemetry.io/build-tools/githubgen"
2526
_ "go.opentelemetry.io/build-tools/issuegenerator"
2627
_ "go.opentelemetry.io/build-tools/multimod"
2728
_ "go.opentelemetry.io/collector/cmd/builder"

0 commit comments

Comments
 (0)