From 4cb5e88d5208b1f1cb3bc2b21e840a87b9dacbbd Mon Sep 17 00:00:00 2001 From: Georgi Chulkov Date: Fri, 3 May 2024 11:29:09 +0200 Subject: [PATCH] Remove hack directory --- .reuse/dep5 | 1 - {hack => LICENSES}/boilerplate.go.txt | 0 {hack => LICENSES}/license-header.txt | 0 Makefile | 4 ++-- internal/tools/generate.sh | 4 ++-- 5 files changed, 4 insertions(+), 5 deletions(-) rename {hack => LICENSES}/boilerplate.go.txt (100%) rename {hack => LICENSES}/license-header.txt (100%) 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/boilerplate.go.txt b/LICENSES/boilerplate.go.txt similarity index 100% rename from hack/boilerplate.go.txt rename to LICENSES/boilerplate.go.txt diff --git a/hack/license-header.txt b/LICENSES/license-header.txt similarity index 100% rename from hack/license-header.txt rename to LICENSES/license-header.txt diff --git a/Makefile b/Makefile index 41dda694..1c9559e6 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="LICENSES/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 LICENSES/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..f3733e58 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 LICENSES/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 LICENSES/boilerplate.go.txt \ --input-dirs "$APIS_APPLYCONFIGURATION" \ --openapi-schema "$MODELSSCHEMA" \ --output-package "github.com/ironcore-dev/metal/client/applyconfiguration"