|
1 | 1 | addheaders:
|
2 |
| - @command -v addlicense > /dev/null || go install -modfile=tools.mod -v github.com/google/addlicense |
| 2 | + @command -v addlicense > /dev/null || (echo "🚀 Installing addlicense..."; go install -modfile=tools.mod -v github.com/google/addlicense) |
3 | 3 | @addlicense -c "The Serverless Workflow Specification Authors" -l apache .
|
4 | 4 |
|
5 | 5 | fmt:
|
6 | 6 | @go vet ./...
|
7 | 7 | @go fmt ./...
|
8 | 8 |
|
9 | 9 | goimports:
|
10 |
| - @command -v goimports > /dev/null || go install golang.org/x/tools/cmd/goimports@latest |
| 10 | + @command -v goimports > /dev/null || (echo "🚀 Installing goimports..."; go install golang.org/x/tools/cmd/goimports@latest) |
11 | 11 | @goimports -w .
|
12 | 12 |
|
13 |
| - |
14 | 13 | lint:
|
15 |
| - @command -v golangci-lint > /dev/null || curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b "${GOPATH}/bin" |
16 |
| - make addheaders |
17 |
| - make goimports |
18 |
| - make fmt |
19 |
| - ./hack/go-lint.sh ${params} |
| 14 | + @echo "🚀 Running lint..." |
| 15 | + @command -v golangci-lint > /dev/null || (echo "🚀 Installing golangci-lint..."; curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b "${GOPATH}/bin") |
| 16 | + @make addheaders |
| 17 | + @make goimports |
| 18 | + @make fmt |
| 19 | + @./hack/go-lint.sh ${params} |
| 20 | + @echo "✅ Linting completed!" |
20 | 21 |
|
21 | 22 | .PHONY: test
|
22 | 23 | coverage="false"
|
23 | 24 |
|
24 | 25 | test: deepcopy buildergen
|
25 |
| - make lint |
| 26 | + @echo "🧪 Running tests..." |
26 | 27 | @go test ./...
|
| 28 | + @echo "✅ Tests completed!" |
27 | 29 |
|
28 |
| -.PHONY: deepcopy buildergen |
29 | 30 | deepcopy: $(DEEPCOPY_GEN) ## Download deepcopy-gen locally if necessary.
|
30 |
| - ./hack/deepcopy-gen.sh deepcopy |
| 31 | + @echo "📦 Running deepcopy-gen..." |
| 32 | + @./hack/deepcopy-gen.sh deepcopy > /dev/null |
| 33 | + @make lint |
| 34 | + @echo "✅ Deepcopy generation and linting completed!" |
31 | 35 |
|
32 | 36 | buildergen: $(BUILDER_GEN) ## Download builder-gen locally if necessary.
|
33 |
| - ./hack/builder-gen.sh buildergen |
| 37 | + @echo "📦 Running builder-gen..." |
| 38 | + @./hack/builder-gen.sh buildergen > /dev/null |
| 39 | + @make lint |
| 40 | + @echo "✅ Builder generation and linting completed!" |
34 | 41 |
|
35 | 42 | .PHONY: kube-integration
|
36 | 43 | kube-integration: controller-gen
|
37 |
| - $(CONTROLLER_GEN) rbac:roleName=manager-role crd:allowDangerousTypes=true webhook paths="./..." output:crd:artifacts:config=config/crd/bases |
| 44 | + @echo "📦 Generating Kubernetes objects..." |
| 45 | + @$(CONTROLLER_GEN) object:headerFile="./hack/boilerplate.txt" paths="./kubernetes/api/..." |
| 46 | + @echo "📦 Generating Kubernetes CRDs..." |
| 47 | + @$(CONTROLLER_GEN) rbac:roleName=manager-role crd:allowDangerousTypes=true webhook paths="./kubernetes/..." output:crd:artifacts:config=config/crd/bases |
| 48 | + @make lint |
| 49 | + @echo "✅ Kubernetes integration completed!" |
38 | 50 |
|
39 | 51 |
|
40 | 52 | ####################################
|
|
0 commit comments