From c1b30085689647e79683414d30d360595b28833f Mon Sep 17 00:00:00 2001 From: Damien Mathieu <42@dmathieu.com> Date: Thu, 28 Nov 2024 15:05:28 +0100 Subject: [PATCH] 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 --- Makefile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 397934c..7632106 100644 --- a/Makefile +++ b/Makefile @@ -39,7 +39,8 @@ endif GO := go GO_MOD_ROOT := go.opentelemetry.io/proto ALL_GO_MOD_DIRS := $(shell find . -type f -name 'go.mod' -exec dirname {} \; | sort) -OTEL_GO_MOD_DIRS := $(filter-out $(TOOLS_MOD_DIR), $(ALL_GO_MOD_DIRS)) +ALL_GO_SUB_MOD_DIRS := $(shell find . -type f -name 'go.mod' -mindepth 2 -exec dirname {} \; | sort) +OTEL_GO_MOD_DIRS := $(filter-out $(TOOLS_MOD_DIR), $(ALL_GO_SUB_MOD_DIRS)) TIMEOUT = 60 PROTOBUF_GEN_DIR := opentelemetry-proto-gen @@ -159,7 +160,8 @@ clean-gen: rm -rf $(GEN_TEMP_DIR) .PHONY: clean -clean: clean-gen +clean: + rm -rf $(GEN_TEMP_DIR) rm -rf $(OTLP_OUTPUT_DIR)/*/ $(OTLPSLIM_OUTPUT_DIR)/*/ .PHONY: go-mod-tidy