Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chore/hack #63

Merged
merged 1 commit into from
May 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
1 change: 0 additions & 1 deletion .reuse/dep5
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ Files:
api/*
cmd/*
config/*
hack/*
internal/*
test/*
.dockerignore
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions internal/tools/generate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand All @@ -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"