github.com/pwn-term/docker@v0.0.0-20210616085119-6e977cce2565/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 tests, to change the output format use: GOTESTSUM_FORMAT=(dots|short|standard-quiet|short-verbose|standard-verbose) make test-unit 15 gotestsum $(TESTFLAGS) -- $${TESTDIRS:-$(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 gotestsum -- -coverprofile=coverage.txt $(shell go list ./... | grep -vE '/vendor/|/e2e/') 23 24 .PHONY: fmt 25 fmt: 26 go list -f {{.Dir}} ./... | xargs gofmt -w -s -d 27 28 .PHONY: lint 29 lint: ## run all the lint tools 30 gometalinter --config gometalinter.json ./... 31 32 .PHONY: binary 33 binary: ## build executable for Linux 34 @echo "WARNING: binary creates a Linux executable. Use cross for macOS or Windows." 35 ./scripts/build/binary 36 37 .PHONY: plugins 38 plugins: ## build example CLI plugins 39 ./scripts/build/plugins 40 41 .PHONY: cross 42 cross: ## build executable for macOS and Windows 43 ./scripts/build/cross 44 45 .PHONY: binary-windows 46 binary-windows: ## build executable for Windows 47 ./scripts/build/windows 48 49 .PHONY: plugins-windows 50 plugins-windows: ## build example CLI plugins for Windows 51 ./scripts/build/plugins-windows 52 53 .PHONY: binary-osx 54 binary-osx: ## build executable for macOS 55 ./scripts/build/osx 56 57 .PHONY: plugins-osx 58 plugins-osx: ## build example CLI plugins for macOS 59 ./scripts/build/plugins-osx 60 61 .PHONY: dynbinary 62 dynbinary: ## build dynamically linked binary 63 ./scripts/build/dynbinary 64 65 vendor: vendor.conf ## check that vendor matches vendor.conf 66 rm -rf vendor 67 bash -c 'vndr |& grep -v -i clone | tee ./vndr.log' 68 scripts/validate/check-git-diff vendor 69 scripts/validate/check-all-packages-vendored 70 71 .PHONY: authors 72 authors: ## generate AUTHORS file from git history 73 scripts/docs/generate-authors.sh 74 75 .PHONY: manpages 76 manpages: ## generate man pages from go source and markdown 77 scripts/docs/generate-man.sh 78 79 .PHONY: yamldocs 80 yamldocs: ## generate documentation YAML files consumed by docs repo 81 scripts/docs/generate-yaml.sh 82 83 .PHONY: shellcheck 84 shellcheck: ## run shellcheck validation 85 scripts/validate/shellcheck 86 87 .PHONY: help 88 help: ## print this help 89 @awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z0-9_-]+:.*?## / {gsub("\\\\n",sprintf("\n%22c",""), $$2);printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST) 90 91 92 cli/compose/schema/bindata.go: cli/compose/schema/data/*.json 93 go generate github.com/docker/cli/cli/compose/schema 94 95 compose-jsonschema: cli/compose/schema/bindata.go ## generate compose-file schemas 96 scripts/validate/check-git-diff cli/compose/schema/bindata.go 97 98 .PHONY: ci-validate 99 ci-validate: 100 time make -B vendor 101 time make -B compose-jsonschema 102 time make manpages 103 time make yamldocs