@@ -142,24 +142,27 @@ function check_incorrect_makefile_variable_brackets() {
142
142
}
143
143
144
144
function pre_commit() {
145
+ if [[ " ${MDB_UPDATE_LICENSES:- " " } " == " true" ]]; then
146
+ ( (time update_licenses) 2>&1 | prepend " update_licenses" ) &
147
+ fi
148
+ ( (time scripts/evergreen/lint_code.sh) 2>&1 | prepend " lint_code.sh" ) &
149
+ ( (time start_shellcheck) 2>&1 | prepend " shellcheck" ) &
150
+
145
151
# Update release.json first in case there is a newer version
146
152
(time update_release_json) 2>&1 | prepend " update_release_json"
147
153
# We need to generate the values files first
148
154
(time update_values_yaml_files) 2>&1 | prepend " update_values_yaml_files"
149
155
# The values files are used for generating the standalone yaml
150
156
(time generate_standalone_yaml) 2>&1 | prepend " generate_standalone_yaml"
151
- # Run black on python files that have changed
152
- (time python_formatting) 2>&1 | prepend " python_formatting"
153
-
154
- (time regenerate_public_rbac_multi_cluster) 2>&1 | prepend " regenerate_public_rbac_multi_cluster"
155
157
156
- (time start_shellcheck ) 2>&1 | prepend " shellcheck "
158
+ ( ( time regenerate_public_rbac_multi_cluster ) 2>&1 | prepend " regenerate_public_rbac_multi_cluster " ) &
157
159
158
- (time check_erroneous_kubebuilder_annotations) 2>&1 | prepend " check_erroneous_kubebuilder_annotations"
160
+ # Run black and isort on python files that have changed
161
+ ( (time python_formatting) 2>&1 | prepend " python_formatting" ) &
159
162
160
- (time scripts/evergreen/lint_code.sh ) 2>&1 | prepend " lint_code.sh "
163
+ ( ( time check_erroneous_kubebuilder_annotations ) 2>&1 | prepend " check_erroneous_kubebuilder_annotations " ) &
161
164
162
- (time update_licenses) 2>&1 | prepend " update_licenses "
165
+ wait
163
166
}
164
167
165
168
# Function to run shellcheck on a single file
@@ -196,7 +199,7 @@ if [[ "${cmd}" == "generate_standalone_yaml" ]]; then
196
199
shift 1
197
200
generate_standalone_yaml " $@ "
198
201
elif [[ " ${cmd} " == " pre-commit" ]]; then
199
- pre_commit
202
+ time pre_commit
200
203
elif [[ " ${cmd} " == " shellcheck" ]]; then
201
204
start_shellcheck
202
205
elif [[ " ${cmd} " == " lint" ]]; then
0 commit comments