Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

Commit

Permalink
clh: client: update acording to versions.yaml
Browse files Browse the repository at this point in the history
Instead of point to master use the version defined
in versions.yaml

Fixes: #2341

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
  • Loading branch information
jcvenegas committed Dec 10, 2019
1 parent d0e30ef commit efb611a
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion virtcontainers/pkg/cloud-hypervisor/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
#

all: | update-yaml generate-client-code
MK_DIR := $(dir $(realpath $(firstword $(MAKEFILE_LIST))))
YQ_INSTALLER := "$(MK_DIR)/../../../.ci/install-yq.sh"
VERSIONS_FILE := "$(MK_DIR)/../../../versions.yaml"
YQ := $(shell command -v yq 2> /dev/null)

generate-client-code: clean-generated-code
docker run --rm \
Expand All @@ -14,8 +18,14 @@ generate-client-code: clean-generated-code
-g go \
-o /local/client



update-yaml:
curl -OL https://raw.githubusercontent.com/cloud-hypervisor/cloud-hypervisor/master/vmm/src/api/openapi/cloud-hypervisor.yaml
ifndef YQ
$(MK_DIR)/../../../.ci/install-yq.sh
endif
clh_version=$(shell yq r $(VERSIONS_FILE) assets.hypervisor.cloud_hypervisor.version); \
curl -OL https://raw.githubusercontent.com/cloud-hypervisor/cloud-hypervisor/$$clh_version/vmm/src/api/openapi/cloud-hypervisor.yaml

clean-generated-code:
rm "./client" -rf

0 comments on commit efb611a

Please sign in to comment.