@@ -65,8 +65,6 @@ CNI_OVERLAY_BUILD_DIR = $(BUILD_DIR)/cni-overlay
6565CNI_BAREMETAL_BUILD_DIR = $(BUILD_DIR ) /cni-baremetal
6666CNS_BUILD_DIR = $(BUILD_DIR ) /cns
6767NPM_BUILD_DIR = $(BUILD_DIR ) /npm
68- TOOLS_DIR = $(REPO_ROOT ) /build/tools
69- TOOLS_BIN_DIR = $(TOOLS_DIR ) /bin
7068CNI_AI_ID = 5515a1eb-b2bc-406a-98eb-ba462e6f0411
7169CNS_AI_ID = ce672799-8f08-4235-8c12-08563dc2acef
7270NPM_AI_ID = 014c22bd-4107-459e-8475-67909e96edcb
@@ -75,15 +73,6 @@ CNI_AI_PATH=$(ACN_PACKAGE_PATH)/telemetry.aiMetadata
7573CNS_AI_PATH =$(ACN_PACKAGE_PATH ) /cns/logger.aiMetadata
7674NPM_AI_PATH =$(ACN_PACKAGE_PATH ) /npm.aiMetadata
7775
78- # Tool paths
79- CONTROLLER_GEN := $(TOOLS_BIN_DIR ) /controller-gen
80- GOCOV := $(TOOLS_BIN_DIR ) /gocov
81- GOCOV_XML := $(TOOLS_BIN_DIR ) /gocov-xml
82- GOFUMPT := $(TOOLS_BIN_DIR ) /gofumpt
83- GOLANGCI_LINT := $(TOOLS_BIN_DIR ) /golangci-lint
84- GO_JUNIT_REPORT := $(TOOLS_BIN_DIR ) /go-junit-report
85- MOCKGEN := $(TOOLS_BIN_DIR ) /mockgen
86-
8776# Archive file names.
8877ACNCLI_ARCHIVE_NAME = acncli-$(GOOS ) -$(GOARCH ) -$(ACN_VERSION ) .$(ARCHIVE_EXT )
8978CNI_ARCHIVE_NAME = azure-vnet-cni-$(GOOS ) -$(GOARCH ) -$(CNI_VERSION ) .$(ARCHIVE_EXT )
@@ -680,16 +669,17 @@ endif
680669
681670clean : # # Clean build artifacts.
682671 $(RMDIR ) $(OUTPUT_DIR )
683- $(RMDIR ) $(TOOLS_BIN_DIR )
684672 $(RMDIR ) go.work*
685673
686674
687675LINT_PKG ?= .
688676
689- lint : $(GOLANGCI_LINT ) # # Fast lint vs default branch showing only new issues.
677+ GOLANGCI_LINT = go tool golangci-lint
678+
679+ lint : # # Fast lint vs default branch showing only new issues.
690680 GOGC=20 $(GOLANGCI_LINT ) run --new-from-rev release/v1.4 --timeout 10m -v $(LINT_PKG ) /...
691681
692- lint-all : $( GOLANGCI_LINT ) # # Lint the current branch in entirety.
682+ lint-all : # # Lint the current branch in entirety.
693683 GOGC=20 $(GOLANGCI_LINT ) run -v $(LINT_PKG ) /...
694684
695685
@@ -761,57 +751,7 @@ gitconfig: ## configure the local git repository
761751 @git config core.fsmonitor true
762752 @git config core.untrackedcache true
763753
764- setup : tools install-hooks gitconfig # # performs common required repo setup
765-
766-
767- # #@ Tools
768-
769- $(TOOLS_DIR ) /go.mod :
770- cd $(TOOLS_DIR ) ; go mod init && go mod tidy
771-
772- $(CONTROLLER_GEN ) : $(TOOLS_DIR ) /go.mod
773- cd $(TOOLS_DIR ) ; go mod download; go build -o bin/controller-gen sigs.k8s.io/controller-tools/cmd/controller-gen
774-
775- controller-gen : $(CONTROLLER_GEN ) # # Build controller-gen
776-
777- protoc :
778- source ${REPO_ROOT} /scripts/install-protoc.sh
779-
780- $(GOCOV ) : $(TOOLS_DIR ) /go.mod
781- cd $(TOOLS_DIR ) ; go mod download; go build -o bin/gocov github.com/axw/gocov/gocov
782-
783- gocov : $(GOCOV ) # # Build gocov
784-
785- $(GOCOV_XML ) : $(TOOLS_DIR ) /go.mod
786- cd $(TOOLS_DIR ) ; go mod download; go build -o bin/gocov-xml github.com/AlekSi/gocov-xml
787-
788- gocov-xml : $(GOCOV_XML ) # # Build gocov-xml
789-
790- $(GOFUMPT ) : $(TOOLS_DIR ) /go.mod
791- cd $(TOOLS_DIR ) ; go mod download; go build -o bin/gofumpt mvdan.cc/gofumpt
792-
793- gofumpt : $(GOFUMPT ) # # Build gofumpt
794-
795- $(GOLANGCI_LINT ) : $(TOOLS_DIR ) /go.mod
796- cd $(TOOLS_DIR ) ; go mod download; go build -o bin/golangci-lint github.com/golangci/golangci-lint/cmd/golangci-lint
797-
798- golangci-lint : $(GOLANGCI_LINT ) # # Build golangci-lint
799-
800- $(GO_JUNIT_REPORT ) : $(TOOLS_DIR ) /go.mod
801- cd $(TOOLS_DIR ) ; go mod download; go build -o bin/go-junit-report github.com/jstemmer/go-junit-report
802-
803- go-junit-report : $(GO_JUNIT_REPORT ) # # Build go-junit-report
804-
805- $(MOCKGEN ) : $(TOOLS_DIR ) /go.mod
806- cd $(TOOLS_DIR ) ; go mod download; go build -o bin/mockgen github.com/golang/mock/mockgen
807-
808- mockgen : $(MOCKGEN ) # # Build mockgen
809-
810- clean-tools :
811- rm -r build/tools/bin
812-
813- tools : acncli gocov gocov-xml go-junit-report golangci-lint gofumpt protoc # # Build bins for build tools
814-
754+ setup : install-hooks gitconfig # # performs common required repo setup
815755
816756# #@ Help
817757
0 commit comments