packaging: use local version file for kata 2.0 in Makefile
Use local version file instead of downloading from upstream repo.
Fixes:
@@ -9,10 +9,8 @@ MK_DIR :=$(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
SED := sed
YQ := $(MK_DIR)/yq
SNAPCRAFT_FILE := snap/snapcraft.yaml
-VERSIONS_YAML_FILE := versions.yaml
-VERSIONS_YAML_FILE_URL := https://raw.githubusercontent.com/kata-containers/runtime/master/versions.yaml
-VERSION_FILE := VERSION
-VERSION_FILE_URL := https://raw.githubusercontent.com/kata-containers/runtime/master/VERSION
+VERSIONS_YAML_FILE := ../../versions.yaml
+VERSION_FILE := ../../VERSION
export MK_DIR
export YQ
@@ -37,13 +35,7 @@ test-packaging-tools:
$(YQ):
@bash -c "source scripts/lib.sh; install_yq $${MK_DIR}"
-$(VERSION_FILE):
- @curl -sO $(VERSION_FILE_URL)
-
-$(VERSIONS_YAML_FILE):
- @curl -sO $(VERSIONS_YAML_FILE_URL)
-
-snap: $(YQ) $(VERSION_FILE)
+snap: $(YQ)
@if [ "$$(cat $(VERSION_FILE))" != "$$($(YQ) r $(SNAPCRAFT_FILE) version)" ]; then \
>&2 echo "Warning: $(SNAPCRAFT_FILE) version is different to upstream $(VERSION_FILE) file"; \
fi
@@ -55,5 +47,4 @@ obs-test:
cmd-kata-pkgsync:
@make -C $(MK_DIR)/cmd/kata-pkgsync
-.PHONY: test test-release-tools test-static-build test-packaging-tools snap cmd-kata-pkgsync \
- $(VERSION_FILE) $(VERSIONS_YAML_FILE)
+.PHONY: test test-release-tools test-static-build test-packaging-tools snap cmd-kata-pkgsync
