github.com/xdlianrong208/docker-ce-comments@v17.12.1-ce-rc2+incompatible/components/cli/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  .PHONY: watch
    50  watch: ## monitor file changes and run go test
    51  	./scripts/test/watch
    52  
    53  vendor: vendor.conf ## check that vendor matches vendor.conf
    54  	vndr 2> /dev/null
    55  	scripts/validate/check-git-diff vendor
    56  
    57  .PHONY: manpages
    58  manpages: ## generate man pages from go source and markdown
    59  	scripts/docs/generate-man.sh
    60  
    61  .PHONY: yamldocs
    62  yamldocs: ## generate documentation YAML files consumed by docs repo
    63  	scripts/docs/generate-yaml.sh
    64  
    65  .PHONY: shellcheck
    66  shellcheck: ## run shellcheck validation
    67  	scripts/validate/shellcheck
    68  
    69  .PHONY: help
    70  help: ## print this help
    71  	@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {sub("\\\\n",sprintf("\n%22c"," "), $$2);printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST)
    72  
    73  
    74  cli/compose/schema/bindata.go: cli/compose/schema/data/*.json
    75  	go generate github.com/docker/cli/cli/compose/schema
    76  
    77  compose-jsonschema: cli/compose/schema/bindata.go
    78  	scripts/validate/check-git-diff cli/compose/schema/bindata.go
    79  
    80  .PHONY: ci-validate
    81  ci-validate:
    82  	time make -B vendor
    83  	time make -B compose-jsonschema
    84  	time make manpages
    85  	time make yamldocs