Skip to content

Commit

Permalink
Add mock bundle logic in makefile
Browse files Browse the repository at this point in the history
In the CI we can run the release target using mock
bundles which will help us to detect any issue due to changes
in release target.
  • Loading branch information
praveenkumar committed Jul 16, 2020
1 parent f03f721 commit 19fc361
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .travis.yml
Expand Up @@ -9,3 +9,5 @@ script:
- make cross-lint
- make cross
- make test
- alias podman=docker
- make BUNDLE_DIR=/tmp MOCK_BUNDLE=true release
5 changes: 5 additions & 0 deletions Makefile
Expand Up @@ -45,6 +45,8 @@ SOURCES := $(shell git ls-files *.go ":^vendor")

RELEASE_INFO := release-info.json

MOCK_BUNDLE ?= false

# Check that given variables are set and all have non-empty values,
# die with an error otherwise.
#
Expand Down Expand Up @@ -195,6 +197,9 @@ LIBVIRT_BUNDLENAME = $(BUNDLE_DIR)/crc_libvirt_$(BUNDLE_VERSION).$(BUNDLE_EXTENS

.PHONY: embed_bundle check_bundledir
check_bundledir:
ifeq ($(MOCK_BUNDLE),true)
touch $(HYPERKIT_BUNDLENAME) $(HYPERV_BUNDLENAME) $(LIBVIRT_BUNDLENAME)
endif
@$(call check_defined, BUNDLE_DIR, "Embedding bundle requires BUNDLE_DIR set to a directory containing CRC bundles for all hypervisors")

embed_bundle: LDFLAGS += $(BUNDLE_EMBEDDED)
Expand Down

0 comments on commit 19fc361

Please sign in to comment.