Files
kata-containers/tools/packaging/Makefile
James O. D. Hunt cb2b30970d snap: Build using destructive mode
Destructive mode is required to build the Kata Containers snap. See:

```
.github/workflows/snap-release.yaml
.github/workflows/snap.yaml
```

Hence, update the last file that we forgot to update with
`--destructive-mode`.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2022-05-26 15:56:36 +01:00

35 lines
843 B
Makefile

#
# Copyright (c) 2018 Intel Corporation
#
# SPDX-License-Identifier: Apache-2.0
#
#
MK_DIR :=$(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
SED := sed
YQ := $(MK_DIR)/yq
SNAPCRAFT_FILE := ../../snap/snapcraft.yaml
VERSIONS_YAML_FILE := ../../versions.yaml
VERSION_FILE := ../../VERSION
export MK_DIR
export YQ
export SNAPCRAFT_FILE
export VERSION_FILE
export VERSIONS_YAML_FILE
test-static-build:
@make -f $(MK_DIR)/static-build/qemu/Makefile
@make -f $(MK_DIR)/static-build/firecracker/Makefile
$(YQ):
@bash -c "source scripts/lib.sh; install_yq $${MK_DIR}"
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
snapcraft -d --destructive-mode
.PHONY: test-static-build snap