Skip to content

Commit

Permalink
Merge pull request kubernetes#2617 from WillemMali/move-verify-gendoc…
Browse files Browse the repository at this point in the history
…s-to-makefile

Move verify-gendocs into Makefile and tighten Makefile safety
  • Loading branch information
chrislovecnm authored Jun 14, 2017
2 parents fdcd85f + 60ad299 commit 0c1fd6b
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 37 deletions.
26 changes: 21 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,13 @@ MAKEDIR:=$(strip $(shell dirname "$(realpath $(lastword $(MAKEFILE_LIST)))"))
# Keep in sync with upup/models/cloudup/resources/addons/dns-controller/
DNS_CONTROLLER_TAG=1.6.1

KOPS_RELEASE_VERSION=1.6.1
KOPS_CI_VERSION=1.6.2-beta.1
KOPS=${GOPATH_1ST}/bin/kops
KOPS_RELEASE_VERSION = 1.6.1
KOPS_CI_VERSION = 1.6.2-beta.1

# kops install location
KOPS = ${GOPATH_1ST}/bin/kops
# kops source root directory (without trailing /)
KOPS_ROOT ?= $(patsubst %/,%,$(abspath $(dir $(firstword $(MAKEFILE_LIST)))))

GITSHA := $(shell cd ${GOPATH_1ST}/src/k8s.io/kops; git describe --always)

Expand Down Expand Up @@ -413,13 +417,25 @@ verify-packages:

.PHONY: verify-gendocs
verify-gendocs: kops
KOPS_STATE_STORE= hack/verify-gendocs.sh
TMP_DOCS="$$(mktemp -d)"; \
\
if ! command -v '$(KOPS)' 1>/dev/null 2>&1; then \
echo "kops must be installed. Please run make. Aborting." 1>&2; \
exit 1; \
fi; \
\
'$(KOPS)' genhelpdocs --out "$$TMP_DOCS"; \
\
if ! diff -r "$$TMP_DOCS" '$(KOPS_ROOT)/docs/cli'; then \
echo "Please run make gen-cli-docs." 1>&2; \
exit 1; \
fi

# verify-gendocs will call kops target
# verify-package has to be after verify-gendoc, because with .gitignore for federation bindata
# it bombs in travis. verify-gendoc generates the bindata file.
.PHONY: ci
ci: govet verify-gofmt verify-boilerplate verify-gendocs verify-packages nodeup-gocode examples test
ci: govet verify-gofmt verify-boilerplate nodeup-gocode examples test | verify-gendocs verify-packages
echo "Done!"

# --------------------------------------------------
Expand Down
32 changes: 0 additions & 32 deletions hack/verify-gendocs.sh

This file was deleted.

0 comments on commit 0c1fd6b

Please sign in to comment.