github.com/AliyunContainerService/cli@v0.0.0-20181009023821-814ced4b30d0/Makefile (about) 1 # 2 # github.com/docker/cli 3 # 4 all: binary 5 6 7 _:=$(shell ./scripts/warn-outside-container $(MAKECMDGOALS)) 8 9 .PHONY: clean 10 clean: ## remove build artifacts 11 rm -rf ./build/* cli/winresources/rsrc_* ./man/man[1-9] docs/yaml/gen 12 13 .PHONY: test-unit 14 test-unit: ## run unit test 15 ./scripts/test/unit $(shell go list ./... | grep -vE '/vendor/|/e2e/') 16 17 .PHONY: test 18 test: test-unit ## run tests 19 20 .PHONY: test-coverage 21 test-coverage: ## run test coverage 22 ./scripts/test/unit-with-coverage $(shell go list ./... | grep -vE '/vendor/|/e2e/') 23 24 .PHONY: lint 25 lint: ## run all the lint tools 26 gometalinter --config gometalinter.json ./... 27 28 .PHONY: binary 29 binary: ## build executable for Linux 30 @echo "WARNING: binary creates a Linux executable. Use cross for macOS or Windows." 31 ./scripts/build/binary 32 33 .PHONY: cross 34 cross: ## build executable for macOS and Windows 35 ./scripts/build/cross 36 37 .PHONY: binary-windows 38 binary-windows: ## build executable for Windows 39 ./scripts/build/windows 40 41 .PHONY: binary-osx 42 binary-osx: ## build executable for macOS 43 ./scripts/build/osx 44 45 .PHONY: dynbinary 46 dynbinary: ## build dynamically linked binary 47 ./scripts/build/dynbinary 48 49 vendor: vendor.conf ## check that vendor matches vendor.conf 50 rm -rf vendor 51 bash -c 'vndr |& grep -v -i clone' 52 scripts/validate/check-git-diff vendor 53 54 .PHONY: authors 55 authors: ## generate AUTHORS file from git history 56 scripts/docs/generate-authors.sh 57 58 .PHONY: manpages 59 manpages: ## generate man pages from go source and markdown 60 scripts/docs/generate-man.sh 61 62 .PHONY: yamldocs 63 yamldocs: ## generate documentation YAML files consumed by docs repo 64 scripts/docs/generate-yaml.sh 65 66 .PHONY: shellcheck 67 shellcheck: ## run shellcheck validation 68 scripts/validate/shellcheck 69 70 .PHONY: help 71 help: ## print this help 72 @awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {sub("\\\\n",sprintf("\n%22c"," "), $$2);printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST) 73 74 75 cli/compose/schema/bindata.go: cli/compose/schema/data/*.json 76 go generate github.com/docker/cli/cli/compose/schema 77 78 compose-jsonschema: cli/compose/schema/bindata.go 79 scripts/validate/check-git-diff cli/compose/schema/bindata.go 80 81 .PHONY: ci-validate 82 ci-validate: 83 time make -B vendor 84 time make -B compose-jsonschema 85 time make manpages 86 time make yamldocs