Skip to content

Commit c1b3008

Browse files
authored
Don't run clean-gen twice (#214)
* don't run clean-gen twice * ignore root package from make test, as it does not include any go file
1 parent f83a33f commit c1b3008

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Makefile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ endif
3939
GO := go
4040
GO_MOD_ROOT := go.opentelemetry.io/proto
4141
ALL_GO_MOD_DIRS := $(shell find . -type f -name 'go.mod' -exec dirname {} \; | sort)
42-
OTEL_GO_MOD_DIRS := $(filter-out $(TOOLS_MOD_DIR), $(ALL_GO_MOD_DIRS))
42+
ALL_GO_SUB_MOD_DIRS := $(shell find . -type f -name 'go.mod' -mindepth 2 -exec dirname {} \; | sort)
43+
OTEL_GO_MOD_DIRS := $(filter-out $(TOOLS_MOD_DIR), $(ALL_GO_SUB_MOD_DIRS))
4344
TIMEOUT = 60
4445

4546
PROTOBUF_GEN_DIR := opentelemetry-proto-gen
@@ -159,7 +160,8 @@ clean-gen:
159160
rm -rf $(GEN_TEMP_DIR)
160161

161162
.PHONY: clean
162-
clean: clean-gen
163+
clean:
164+
rm -rf $(GEN_TEMP_DIR)
163165
rm -rf $(OTLP_OUTPUT_DIR)/*/ $(OTLPSLIM_OUTPUT_DIR)/*/
164166

165167
.PHONY: go-mod-tidy

0 commit comments

Comments
 (0)