File tree Expand file tree Collapse file tree 2 files changed +38
-1
lines changed Expand file tree Collapse file tree 2 files changed +38
-1
lines changed Original file line number Diff line number Diff line change @@ -68,6 +68,7 @@ helm-lint:
68
68
${MAKEFILE_PATH} /test/helm/helm-lint.sh
69
69
70
70
# Generate code
71
+ .PHONY : generate
71
72
generate : aws-sdk-model-override controller-gen mockgen
72
73
$(CONTROLLER_GEN ) object:headerFile=" hack/boilerplate.go.txt" paths=" ./..."
73
74
MOCKGEN=$(MOCKGEN ) ./scripts/gen_mocks.sh
@@ -161,9 +162,13 @@ lint:
161
162
echo " TODO"
162
163
163
164
.PHONY : quick-ci
164
- quick-ci : verify-versions
165
+ quick-ci : verify-versions verify-generate
165
166
echo " Done!"
166
167
168
+ .PHONY : verify-generate
169
+ verify-generate :
170
+ hack/verify-generate.sh
171
+
167
172
.PHONY : verify-versions
168
173
verify-versions :
169
174
hack/verify-versions.sh
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+
3
+ # Copyright 2023 The Kubernetes Authors.
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ set -o errexit
18
+ set -o nounset
19
+ set -o pipefail
20
+
21
+ make generate
22
+
23
+ changed_files=$( git status --porcelain --untracked-files=no || true)
24
+ if [ -n " ${changed_files} " ]; then
25
+ echo " Detected that generated code is not up to date; run 'make generate'"
26
+ echo " changed files:"
27
+ printf " %s\n" " ${changed_files} "
28
+ echo " git diff:"
29
+ git --no-pager diff
30
+ echo " To fix: run 'make generate'"
31
+ exit 1
32
+ fi
You can’t perform that action at this time.
0 commit comments