Skip to content

Commit

Permalink
Remove verify_gen_openapi make rule.
Browse files Browse the repository at this point in the history
  • Loading branch information
spxtr committed Apr 26, 2017
1 parent 48fc03b commit 3bc3e41
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 20 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ kubernetes.tar.gz
# generated files in any directory
# TODO(thockin): uncomment this when we stop committing the generated files.
#zz_generated.*
zz_generated.openapi.go

# make-related metadata
/.make/
Expand Down
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,8 @@ clean: clean_meta
build/make-clean.sh
rm -rf $(OUT_DIR)
rm -rf Godeps/_workspace # Just until we are sure it is gone
# TODO(thockin): Remove this when we call clean_generated.
rm -f pkg/generated/openapi/zz_generated.openapi.go
endif

define CLEAN_META_HELP_INFO
Expand Down
31 changes: 11 additions & 20 deletions Makefile.generated_files
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,7 @@ generated_files: gen_deepcopy gen_defaulter gen_conversion gen_openapi
.PHONY: verify_generated_files
verify_generated_files: verify_gen_deepcopy \
verify_gen_defaulter \
verify_gen_conversion \
verify_gen_openapi
verify_gen_conversion

# Code-generation logic.
#
Expand Down Expand Up @@ -480,27 +479,10 @@ OPENAPI_DIRS := $(shell \

OPENAPI_OUTFILE := $(OPENAPI_OUTPUT_PKG)/$(OPENAPI_FILENAME)

# Shell function for reuse in rules.
RUN_GEN_OPENAPI = \
function run_gen_openapi() { \
./hack/run-in-gopath.sh $(OPENAPI_GEN) \
--v $(KUBE_VERBOSE) \
--logtostderr \
-i $$(echo $(addprefix $(PRJ_SRC_PATH)/, $(OPENAPI_DIRS)) | sed 's/ /,/g') \
-p $(PRJ_SRC_PATH)/$(OPENAPI_OUTPUT_PKG) \
-O $(OPENAPI_BASENAME) \
"$$@"; \
}; \
run_gen_openapi

# This rule is the user-friendly entrypoint for openapi generation.
.PHONY: gen_openapi
gen_openapi: $(OPENAPI_OUTFILE) $(OPENAPI_GEN)

.PHONY: verify_gen_openapi
verify_gen_openapi: $(OPENAPI_GEN)
$(RUN_GEN_OPENAPI) --verify-only

# For each dir in OPENAPI_DIRS, this establishes a dependency between the
# output file and the input files that should trigger a rebuild.
#
Expand All @@ -520,7 +502,16 @@ $(foreach dir, $(OPENAPI_DIRS), $(eval \

# How to regenerate open-api code. This emits a single file for all results.
$(OPENAPI_OUTFILE): $(OPENAPI_GEN) $(OPENAPI_GEN)
$(RUN_GEN_OPENAPI)
function run_gen_openapi() { \
./hack/run-in-gopath.sh $(OPENAPI_GEN) \
--v $(KUBE_VERBOSE) \
--logtostderr \
-i $$(echo $(addprefix $(PRJ_SRC_PATH)/, $(OPENAPI_DIRS)) | sed 's/ /,/g') \
-p $(PRJ_SRC_PATH)/$(OPENAPI_OUTPUT_PKG) \
-O $(OPENAPI_BASENAME) \
"$$@"; \
}; \
run_gen_openapi

# This calculates the dependencies for the generator tool, so we only rebuild
# it when needed. It is PHONY so that it always runs, but it only updates the
Expand Down

0 comments on commit 3bc3e41

Please sign in to comment.