mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-05-01 05:04:26 +00:00
packaging: use local version file for kata 2.0 in Makefile
Use local version file instead of downloading from upstream repo. Fixes: #756 Signed-off-by: zhanghj <zhanghj.lc@inspur.com>
This commit is contained in:
parent
e579321cc6
commit
61181b9f86
@ -9,10 +9,8 @@ MK_DIR :=$(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
|
|||||||
SED := sed
|
SED := sed
|
||||||
YQ := $(MK_DIR)/yq
|
YQ := $(MK_DIR)/yq
|
||||||
SNAPCRAFT_FILE := snap/snapcraft.yaml
|
SNAPCRAFT_FILE := snap/snapcraft.yaml
|
||||||
VERSIONS_YAML_FILE := versions.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 := VERSION
|
|
||||||
VERSION_FILE_URL := https://raw.githubusercontent.com/kata-containers/runtime/master/VERSION
|
|
||||||
|
|
||||||
export MK_DIR
|
export MK_DIR
|
||||||
export YQ
|
export YQ
|
||||||
@ -37,13 +35,7 @@ test-packaging-tools:
|
|||||||
$(YQ):
|
$(YQ):
|
||||||
@bash -c "source scripts/lib.sh; install_yq $${MK_DIR}"
|
@bash -c "source scripts/lib.sh; install_yq $${MK_DIR}"
|
||||||
|
|
||||||
$(VERSION_FILE):
|
snap: $(YQ)
|
||||||
@curl -sO $(VERSION_FILE_URL)
|
|
||||||
|
|
||||||
$(VERSIONS_YAML_FILE):
|
|
||||||
@curl -sO $(VERSIONS_YAML_FILE_URL)
|
|
||||||
|
|
||||||
snap: $(YQ) $(VERSION_FILE)
|
|
||||||
@if [ "$$(cat $(VERSION_FILE))" != "$$($(YQ) r $(SNAPCRAFT_FILE) version)" ]; then \
|
@if [ "$$(cat $(VERSION_FILE))" != "$$($(YQ) r $(SNAPCRAFT_FILE) version)" ]; then \
|
||||||
>&2 echo "Warning: $(SNAPCRAFT_FILE) version is different to upstream $(VERSION_FILE) file"; \
|
>&2 echo "Warning: $(SNAPCRAFT_FILE) version is different to upstream $(VERSION_FILE) file"; \
|
||||||
fi
|
fi
|
||||||
@ -55,5 +47,4 @@ obs-test:
|
|||||||
cmd-kata-pkgsync:
|
cmd-kata-pkgsync:
|
||||||
@make -C $(MK_DIR)/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 \
|
.PHONY: test test-release-tools test-static-build test-packaging-tools snap cmd-kata-pkgsync
|
||||||
$(VERSION_FILE) $(VERSIONS_YAML_FILE)
|
|
||||||
|
Loading…
Reference in New Issue
Block a user