From 6aea6fe86ba6d29d38dd7e52ced042cb7ca450a0 Mon Sep 17 00:00:00 2001 From: Tim Hockin Date: Wed, 4 Jan 2023 16:03:42 -0800 Subject: [PATCH] Codegen: rm openapi files before regen --- hack/update-codegen.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hack/update-codegen.sh b/hack/update-codegen.sh index e8c2933ab18..7ead9d63d5c 100755 --- a/hack/update-codegen.sh +++ b/hack/update-codegen.sh @@ -501,6 +501,8 @@ function codegen::openapi() { "${apimachinery_dirs[@]}" ) + git_find -z ':(glob)**'/"${output_base}.go" | xargs -0 rm -f + for prefix in "${targets[@]}"; do local report_file="${OUT_DIR}/${prefix}_violations.report" # When UPDATE_API_KNOWN_VIOLATIONS is set to be true, let the generator to write