runtime: Format auto-generated client code for cloud-hypervisor API
This patch extends the current process of generating client code for
cloud-hypervisor API with an additional step, `go-fmt`, which will remove
the generated `client/go.mod` file and format all auto-generated code.
Fixes:
# SPDX-License-Identifier: Apache-2.0
#
-all: | update-yaml generate-client-code
+all: | update-yaml generate-client-code go-fmt
MK_DIR := $(dir $(realpath $(firstword $(MAKEFILE_LIST))))
YQ_INSTALLER := "$(MK_DIR)/../../../../../ci/install_yq.sh"
VERSIONS_FILE := "$(MK_DIR)/../../../../../versions.yaml"
@@ -17,8 +17,9 @@ generate-client-code: clean-generated-code
-i /local/cloud-hypervisor.yaml \
-g go \
-o /local/client
-
-
+go-fmt:
+ rm client/go.mod; \
+ go fmt ./...
update-yaml:
ifndef YQ
