Skip to content

Commit

Permalink
make: allow overriding quick-release opts
Browse files Browse the repository at this point in the history
Prior to this change, `make quick-release KUBE_RELEASE_RUN_TESTS=y`
would still not run the tests. This change makes it so such overriding
works.

It also specifies the options as variables, which helps some shells with
tab-completion.
  • Loading branch information
euank committed Dec 27, 2016
1 parent 20003bd commit 883c7c4
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ KUBE_GOFLAGS := $(GOFLAGS)
KUBE_GOLDFLAGS := $(GOLDFLAGS)
KUBE_GOGCFLAGS = $(GOGCFLAGS)

# Extra options for the release or quick-release options:
KUBE_RELEASE_RUN_TESTS := $(KUBE_RELEASE_RUN_TESTS)
KUBE_FASTBUILD := $(KUBE_FASTBUILD)

# This controls the verbosity of the build. Higher numbers mean more output.
KUBE_VERBOSE ?= 1

Expand Down Expand Up @@ -347,17 +351,23 @@ endif

define RELEASE_SKIP_TESTS_HELP_INFO
# Build a release, but skip tests
#
# Args:
# KUBE_RELEASE_RUN_TESTS: Whether to run tests. Set to 'y' to run tests anyways.
# KUBE_FASTBUILD: Whether to cross-compile for other architectures. Set to 'true' to do so.
#
# Example:
# make release-skip-tests
# make quick-release
endef
.PHONY: release-skip-tests quick-release
ifeq ($(PRINT_HELP),y)
release-skip-tests quick-release:
@echo "$$RELEASE_SKIP_TESTS_HELP_INFO"
else
release-skip-tests quick-release: KUBE_RELEASE_RUN_TESTS = n KUBE_FASTBUILD = true
release-skip-tests quick-release:
KUBE_RELEASE_RUN_TESTS=n KUBE_FASTBUILD=true build/release.sh
build/release.sh
endif

define CROSS_HELP_INFO
Expand Down

0 comments on commit 883c7c4

Please sign in to comment.