You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -53,22 +56,22 @@ clean: ## Remove dtm and plugins. It's best to run a "clean" before "build".
53
56
-rm -f dtm*
54
57
55
58
.PHONY: build-core
56
-
build-core: fmt lint vet mod-tidy ## Build dtm core only, without plugins, locally.
59
+
build-core: generate fmt lint vet mod-tidy ## Build dtm core only, without plugins, locally.
57
60
go build -trimpath -gcflags="all=-N -l" -ldflags "$(GO_LDFLAGS)" -o dtm-${GOOS}-${GOARCH} ./cmd/devstream/
58
61
@-rm -f dtm
59
62
@mv dtm-${GOOS}-${GOARCH} dtm
60
63
@echo "${GREEN}✔'dtm' has been generated in the current directory($(PWD))!${RESET}"
61
64
62
65
.PHONY: build-plugin.%
63
-
build-plugin.%: fmt lint vet mod-tidy ## Build one dtm plugin, like "make build-plugin.argocd".
66
+
build-plugin.%: generate fmt lint vet mod-tidy ## Build one dtm plugin, like "make build-plugin.argocd".
64
67
$(eval plugin_name := $(strip$*))
65
68
@[ -d$(ROOT_DIR)/cmd/plugin/$(plugin_name) ] || { echo -e "\n${RED}✘ Plugin '$(plugin_name)' not found!${RESET} The valid plugin name is as follows (Eg. You can use ${YELLOW}make build-plugin.argocd${RESET} to build argocd plugin): \n\n$(shell ls ./cmd/plugin/)\n";exit 1; }
build-plugins: fmt vet mod-tidy $(addprefix build-plugin.,$(PLUGINS))## Build dtm plugins only. Use multi-threaded like "make build-plugins -j8" to speed up.
74
+
build-plugins: generate fmt vet mod-tidy $(addprefix build-plugin.,$(PLUGINS))## Build dtm plugins only. Use multi-threaded like "make build-plugins -j8" to speed up.
72
75
73
76
.PHONY: build
74
77
build: build-core build-plugins ## Build everything. Use multi-threaded like "make build -j8" to speed up.
@@ -91,6 +94,9 @@ fmt: verify.goimports ## Run 'go fmt' & goimports against code.
91
94
@$(FIND) -type f | xargs ${GOPATH}/bin/goimports -w -local $(DTM_ROOT)
92
95
@go mod edit -fmt
93
96
97
+
.PHONY: generate
98
+
generate: ## Run "go generate ./...".
99
+
go generate ./...
94
100
95
101
.PHONY: lint
96
102
lint: verify.golangci-lint ## Run 'golangci-lint' against code.
0 commit comments