diff --git a/hack/boilerplate.go.txt b/.reuse/boilerplate.go.txt similarity index 100% rename from hack/boilerplate.go.txt rename to .reuse/boilerplate.go.txt diff --git a/.reuse/dep5 b/.reuse/dep5 index 88ba77b2..2308ce83 100644 --- a/.reuse/dep5 +++ b/.reuse/dep5 @@ -29,7 +29,6 @@ Files: api/* cmd/* config/* - hack/* internal/* test/* .dockerignore diff --git a/hack/license-header.txt b/.reuse/license-header.txt similarity index 100% rename from hack/license-header.txt rename to .reuse/license-header.txt diff --git a/Makefile b/Makefile index 41dda694..0f7379d7 100644 --- a/Makefile +++ b/Makefile @@ -37,7 +37,7 @@ manifests: ## Generate WebhookConfiguration, ClusterRole and CustomResourceDefin .PHONY: generate generate: ## Generate code containing DeepCopy, DeepCopyInto, and DeepCopyObject method implementations. - @go run sigs.k8s.io/controller-tools/cmd/controller-gen object:headerFile="hack/boilerplate.go.txt" paths="./..." + @go run sigs.k8s.io/controller-tools/cmd/controller-gen object:headerFile=".reuse/boilerplate.go.txt" paths="./..." @internal/tools/generate.sh .PHONY: fmt @@ -58,7 +58,7 @@ lint: ## Run golangci-lint linter & yamllint. .PHONY: addlicense addlicense: ## Add license headers to all go files. - @find . -name '*.go' -exec go run github.com/google/addlicense -f hack/license-header.txt {} + + @find . -name '*.go' -exec go run github.com/google/addlicense -f .reuse/license-header.txt {} + .PHONY: checklicense checklicense: ## Check that every file has a license header present. diff --git a/internal/tools/generate.sh b/internal/tools/generate.sh index 21975679..cf0d443b 100755 --- a/internal/tools/generate.sh +++ b/internal/tools/generate.sh @@ -17,7 +17,7 @@ APIS_OPENAPI="k8s.io/apimachinery/pkg/apis/meta/v1,k8s.io/apimachinery/pkg/api/r go run k8s.io/code-generator/cmd/openapi-gen \ --output-base "$GOPATH/src" \ - --go-header-file hack/boilerplate.go.txt \ + --go-header-file .reuse/boilerplate.go.txt \ --input-dirs "$APIS_OPENAPI" \ --output-package "github.com/ironcore-dev/metal/client/openapi" \ -O zz_generated.openapi \ @@ -26,7 +26,7 @@ go run k8s.io/code-generator/cmd/openapi-gen \ go run github.com/ironcore-dev/metal/internal/tools/models-schema > "$MODELSSCHEMA" go run k8s.io/code-generator/cmd/applyconfiguration-gen \ --output-base "$GOPATH/src" \ - --go-header-file hack/boilerplate.go.txt \ + --go-header-file .reuse/boilerplate.go.txt \ --input-dirs "$APIS_APPLYCONFIGURATION" \ --openapi-schema "$MODELSSCHEMA" \ --output-package "github.com/ironcore-dev/metal/client/applyconfiguration"