diff --git a/Makefile.d/functions.mk b/Makefile.d/functions.mk index 52158f9a68..bfa81d228d 100644 --- a/Makefile.d/functions.mk +++ b/Makefile.d/functions.mk @@ -279,21 +279,25 @@ define gen-go-option-test-sources endef define gen-license + BIN_PATH="$(TEMP_DIR)/vald-license-gen"; \ + rm -rf $$BIN_PATH; \ MAINTAINER=$2 \ GOPRIVATE=$(GOPRIVATE) \ GOARCH=$(GOARCH) \ GOOS=$(GOOS) \ - go run -mod=readonly $(ROOTDIR)/hack/license/gen/main.go $1 + go build -mod=readonly -a -o $$BIN_PATH $(ROOTDIR)/hack/license/gen/main.go; \ + $$BIN_PATH $1; \ + rm -rf $$BIN_PATH endef define gen-vald-helm-schema - BIN_PATH="$(TEMP_DIR)/vald-helm-schema-gen" - rm -rf $$BIN_PATH + BIN_PATH="$(TEMP_DIR)/vald-helm-schema-gen"; \ + rm -rf $$BIN_PATH; \ GOPRIVATE=$(GOPRIVATE) \ GOARCH=$(GOARCH) \ GOOS=$(GOOS) \ - go build -mod=readonly -a -o $$BIN_PATH $(ROOTDIR)/hack/helm/schema/gen/main.go - $$BIN_PATH charts/$1.yaml > charts/$1.schema.json + go build -mod=readonly -a -o $$BIN_PATH $(ROOTDIR)/hack/helm/schema/gen/main.go; \ + $$BIN_PATH charts/$1.yaml > charts/$1.schema.json; \ rm -rf $$BIN_PATH endef @@ -301,14 +305,14 @@ define gen-vald-crd if [[ -f $(ROOTDIR)/charts/$1/crds/$2.yaml ]]; then \ mv $(ROOTDIR)/charts/$1/crds/$2.yaml $(TEMP_DIR)/$2.yaml; \ fi; - BIN_PATH="$(TEMP_DIR)/vald-helm-crd-schema-gen" - rm -rf $$BIN_PATH + BIN_PATH="$(TEMP_DIR)/vald-helm-crd-schema-gen"; \ + rm -rf $$BIN_PATH; \ GOPRIVATE=$(GOPRIVATE) \ GOARCH=$(GOARCH) \ GOOS=$(GOOS) \ - go build -mod=readonly -a -o $$BIN_PATH $(ROOTDIR)/hack/helm/schema/crd/main.go - $$BIN_PATH $(ROOTDIR)/charts/$3.yaml > $(TEMP_DIR)/$2-spec.yaml - rm -rf $$BIN_PATH + go build -mod=readonly -a -o $$BIN_PATH $(ROOTDIR)/hack/helm/schema/crd/main.go; \ + $$BIN_PATH $(ROOTDIR)/charts/$3.yaml > $(TEMP_DIR)/$2-spec.yaml; \ + rm -rf $$BIN_PATH; \ $(BINDIR)/yq eval-all 'select(fileIndex==0).spec.versions[0].schema.openAPIV3Schema.properties.spec = select(fileIndex==1).spec | select(fileIndex==0)' \ $(TEMP_DIR)/$2.yaml $(TEMP_DIR)/$2-spec.yaml > $(ROOTDIR)/charts/$1/crds/$2.yaml endef diff --git a/charts/vald-benchmark-operator/job-values.schema.json b/charts/vald-benchmark-operator/schemas/job-values.schema.json similarity index 100% rename from charts/vald-benchmark-operator/job-values.schema.json rename to charts/vald-benchmark-operator/schemas/job-values.schema.json diff --git a/charts/vald-benchmark-operator/scenario-values.schema.json b/charts/vald-benchmark-operator/schemas/scenario-values.schema.json similarity index 100% rename from charts/vald-benchmark-operator/scenario-values.schema.json rename to charts/vald-benchmark-operator/schemas/scenario-values.schema.json