diff --git a/Makefile b/Makefile index ffe4064..54bfa1c 100644 --- a/Makefile +++ b/Makefile @@ -64,7 +64,7 @@ lint: ## Lint the code .PHONY: generate # Regenerate code generate: - ./hack/generate.sh + go generate ./... .PHONY: all all: fmt test lint generate diff --git a/generate.go b/generate.go new file mode 100644 index 0000000..d14612a --- /dev/null +++ b/generate.go @@ -0,0 +1,24 @@ +/* +Copyright 2025 The CDEvents Authors + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + +SPDX-License-Identifier: Apache-2.0 +*/ + +// This file contains go:generate directives for code generation. +// Run `go generate` from the project root to regenerate all code. + +package main + +//go:generate go run tools/generator.go --resources .