mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-06-25 15:02:45 +00:00
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: #1606 Signed-off-by: Bo Chen <chen.bo@intel.com>
This commit is contained in:
parent
c0c7bef2b8
commit
52cacf8838
@ -4,7 +4,7 @@
|
|||||||
# SPDX-License-Identifier: Apache-2.0
|
# 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))))
|
MK_DIR := $(dir $(realpath $(firstword $(MAKEFILE_LIST))))
|
||||||
YQ_INSTALLER := "$(MK_DIR)/../../../../../ci/install_yq.sh"
|
YQ_INSTALLER := "$(MK_DIR)/../../../../../ci/install_yq.sh"
|
||||||
VERSIONS_FILE := "$(MK_DIR)/../../../../../versions.yaml"
|
VERSIONS_FILE := "$(MK_DIR)/../../../../../versions.yaml"
|
||||||
@ -17,8 +17,9 @@ generate-client-code: clean-generated-code
|
|||||||
-i /local/cloud-hypervisor.yaml \
|
-i /local/cloud-hypervisor.yaml \
|
||||||
-g go \
|
-g go \
|
||||||
-o /local/client
|
-o /local/client
|
||||||
|
go-fmt:
|
||||||
|
rm client/go.mod; \
|
||||||
|
go fmt ./...
|
||||||
|
|
||||||
update-yaml:
|
update-yaml:
|
||||||
ifndef YQ
|
ifndef YQ
|
||||||
|
Loading…
Reference in New Issue
Block a user