Skip to content

Commit

Permalink
Update commons-test.mk
Browse files Browse the repository at this point in the history
  • Loading branch information
mmorel-35 authored Dec 17, 2024
1 parent 0e083ba commit c2c5b6b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions commons-test.mk
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ TOOLS_MOD_DIR := $(SRC_ROOT)/internal/tools
TOOLS_MOD_REGEX := "\s+_\s+\".*\""
TOOLS_PKG_NAMES := $(shell grep -E $(TOOLS_MOD_REGEX) < $(TOOLS_MOD_DIR)/tools.go | tr -d " _\"")
TOOLS_BIN_DIR := $(SRC_ROOT)/.tools
TOOLS_BIN_NAMES := $(addprefix $(TOOLS_BIN_DIR)/, $(notdir $(patsubst %/v%,%,$(TOOLS_PKG_NAMES))))
TOOLS_BIN_NAMES := $(addprefix $(TOOLS_BIN_DIR)/, $(notdir $(patsubst %/v2,%,$(TOOLS_PKG_NAMES))))

$(TOOLS_BIN_DIR):
mkdir -p $@

$(TOOLS_BIN_NAMES): $(TOOLS_BIN_DIR) $(TOOLS_MOD_DIR)/go.mod
cd $(TOOLS_MOD_DIR) && GOOS="" GOARCH="" $(GOCMD) build -o $@ -trimpath $(filter %/$(notdir $(patsubst %/v%,%,$@)),$(TOOLS_PKG_NAMES))
cd $(TOOLS_MOD_DIR) && GOOS="" GOARCH="" $(GOCMD) build -o $@ -trimpath $(filter %/$(notdir $(patsubst %/v2,%,$@)),$(TOOLS_PKG_NAMES))

GOLANGCI_LINT := $(TOOLS_BIN_DIR)/golangci-lint
GOTESTSUM := $(TOOLS_BIN_DIR)/gotestsum
Expand Down

0 comments on commit c2c5b6b

Please sign in to comment.