cli/Makefile

91 строка
2.3 KiB
Makefile
Исходник Обычный вид История

#
# github.com/docker/cli
#
all: binary
_:=$(shell ./scripts/warn-outside-container $(MAKECMDGOALS))
.PHONY: clean
clean: ## remove build artifacts
rm -rf ./build/* cli/winresources/rsrc_* ./man/man[1-9] docs/yaml/gen
.PHONY: test-unit
test-unit: ## run unit test
./scripts/test/unit $(shell go list ./... | grep -vE '/vendor/|/e2e/')
.PHONY: test
test: test-unit ## run tests
.PHONY: test-coverage
test-coverage: ## run test coverage
./scripts/test/unit-with-coverage $(shell go list ./... | grep -vE '/vendor/|/e2e/')
.PHONY: fmt
fmt:
go list -f {{.Dir}} ./... | xargs gofmt -w -s -d
.PHONY: lint
lint: ## run all the lint tools
gometalinter --config gometalinter.json ./...
.PHONY: binary
binary: ## build executable for Linux
@echo "WARNING: binary creates a Linux executable. Use cross for macOS or Windows."
./scripts/build/binary
.PHONY: cross
cross: ## build executable for macOS and Windows
./scripts/build/cross
.PHONY: binary-windows
binary-windows: ## build executable for Windows
./scripts/build/windows
.PHONY: binary-osx
binary-osx: ## build executable for macOS
./scripts/build/osx
.PHONY: dynbinary
dynbinary: ## build dynamically linked binary
./scripts/build/dynbinary
vendor: vendor.conf ## check that vendor matches vendor.conf
rm -rf vendor
bash -c 'vndr |& grep -v -i clone'
scripts/validate/check-git-diff vendor
.PHONY: authors
authors: ## generate AUTHORS file from git history
scripts/docs/generate-authors.sh
.PHONY: manpages
manpages: ## generate man pages from go source and markdown
scripts/docs/generate-man.sh
.PHONY: yamldocs
yamldocs: ## generate documentation YAML files consumed by docs repo
scripts/docs/generate-yaml.sh
.PHONY: shellcheck
shellcheck: ## run shellcheck validation
scripts/validate/shellcheck
.PHONY: help
help: ## print this help
Fix some missing targets in "make help" The `make help` output was missing some targets (`fmt`, `test-unit`, `test-e2e`). Note that some targets are still hidden (`test-e2e-experimental`, `test-e2e-non-experimental`, `test-e2e-connhelper-ssh`) as they're likely not usually run separate from `test-e2e`. Before this patch: make -f docker.Makefile help binary build the CLI build alias for binary clean clean build artifacts cross build the CLI for macOS and Windows binary-windows build the CLI for Windows binary-osx build the CLI for macOS dev start a build container in interactive mode for in-container development shell alias for dev lint run linters vendor download dependencies (vendor/) listed in vendor.conf dynbinary build the CLI dynamically linked authors generate AUTHORS file from git history manpages generate man pages from go source and markdown yamldocs generate documentation YAML files consumed by docs repo shellcheck run shellcheck validation help print this help With this patch applied: make -f docker.Makefile help binary build the CLI build alias for binary clean clean build artifacts test-unit run unit tests (using go test) cross build the CLI for macOS and Windows binary-windows build the CLI for Windows binary-osx build the CLI for macOS dev start a build container in interactive mode for in-container development shell alias for dev lint run linters fmt run gofmt vendor download dependencies (vendor/) listed in vendor.conf dynbinary build the CLI dynamically linked authors generate AUTHORS file from git history manpages generate man pages from go source and markdown yamldocs generate documentation YAML files consumed by docs repo shellcheck run shellcheck validation test-e2e run all e2e tests help print this help Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-01-07 19:32:56 +03:00
@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z0-9_-]+:.*?## / {sub("\\\\n",sprintf("\n%22c"," "), $$2);printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST)
cli/compose/schema/bindata.go: cli/compose/schema/data/*.json
go generate github.com/docker/cli/cli/compose/schema
compose-jsonschema: cli/compose/schema/bindata.go
scripts/validate/check-git-diff cli/compose/schema/bindata.go
.PHONY: ci-validate
ci-validate:
time make -B vendor
time make -B compose-jsonschema
time make manpages
time make yamldocs