Skip to content

Commit

Permalink
[chore] add gogci and gci make targets (#28879)
Browse files Browse the repository at this point in the history
add gogci action at top level, and gci action at component level to run
gci
  • Loading branch information
atoulme authored Nov 22, 2023
1 parent 60430e1 commit d79f679
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,10 @@ stability-tests: otelcontribcol
@echo Stability tests are disabled until we have a stable performance environment.
@echo To enable the tests replace this echo by $(MAKE) -C testbed run-stability-tests

.PHONY: gogci
gogci:
$(MAKE) $(FOR_GROUP_TARGET) TARGET="gci"

.PHONY: gotidy
gotidy:
$(MAKE) $(FOR_GROUP_TARGET) TARGET="tidy"
Expand Down
6 changes: 6 additions & 0 deletions Makefile.Common
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ CROSSLINK := $(TOOLS_BIN_DIR)/crosslink
GOJUNIT := $(TOOLS_BIN_DIR)/go-junit-report
BUILDER := $(TOOLS_BIN_DIR)/builder
GOVULNCHECK := $(TOOLS_BIN_DIR)/govulncheck
GCI := $(TOOLS_BIN_DIR)/gci

# BUILD_TYPE should be one of (dev, release).
BUILD_TYPE?=release
Expand Down Expand Up @@ -197,3 +198,8 @@ misspell-correction: $(TOOLS_BIN_DIR)/misspell
.PHONY: moddownload
moddownload:
$(GOCMD) mod download

.PHONY: gci
gci: $(TOOLS_BIN_DIR)/gci
@echo "running $(GCI)"
@$(GCI) write -s standard -s default -s "prefix(github.com/open-telemetry/opentelemetry-collector-contrib)" $(ALL_SRC_AND_DOC)

0 comments on commit d79f679

Please sign in to comment.