2017-04-25 12:57:06 -04:00
|
|
|
#
|
2017-05-09 12:38:23 -04:00
|
|
|
# github.com/docker/cli
|
2017-04-25 12:57:06 -04:00
|
|
|
#
|
2017-05-14 13:24:10 -04:00
|
|
|
all: binary
|
|
|
|
|
2017-07-19 11:44:39 -04:00
|
|
|
|
2017-05-09 17:29:14 -04:00
|
|
|
.PHONY: clean
|
2017-07-19 11:44:39 -04:00
|
|
|
clean: ## remove build artifacts
|
2017-05-10 21:24:32 -04:00
|
|
|
rm -rf ./build/* cli/winresources/rsrc_* ./man/man[1-9] docs/yaml/gen
|
2017-04-25 12:57:06 -04:00
|
|
|
|
2017-05-09 17:29:14 -04:00
|
|
|
.PHONY: test
|
2017-07-19 11:44:39 -04:00
|
|
|
test: ## run go test
|
2017-05-10 21:24:32 -04:00
|
|
|
./scripts/test/unit $(shell go list ./... | grep -v '/vendor/')
|
2017-04-27 18:57:35 -04:00
|
|
|
|
2017-05-18 04:48:24 -04:00
|
|
|
.PHONY: test-coverage
|
2017-07-19 11:44:39 -04:00
|
|
|
test-coverage: ## run test coverage
|
2017-05-10 21:24:32 -04:00
|
|
|
./scripts/test/unit-with-coverage $(shell go list ./... | grep -v '/vendor/')
|
2017-05-18 04:48:24 -04:00
|
|
|
|
2017-05-09 17:29:14 -04:00
|
|
|
.PHONY: lint
|
2017-07-19 11:44:39 -04:00
|
|
|
lint: ## run all the lint tools
|
2017-05-17 12:08:50 -04:00
|
|
|
gometalinter --config gometalinter.json ./...
|
2017-05-02 15:10:03 -04:00
|
|
|
|
2017-05-11 18:52:17 -04:00
|
|
|
.PHONY: binary
|
2017-07-19 11:44:39 -04:00
|
|
|
binary: ## build executable for Linux
|
2017-05-17 12:08:50 -04:00
|
|
|
@echo "WARNING: binary creates a Linux executable. Use cross for macOS or Windows."
|
|
|
|
./scripts/build/binary
|
2017-05-11 18:52:17 -04:00
|
|
|
|
2017-05-09 17:29:14 -04:00
|
|
|
.PHONY: cross
|
2017-07-19 11:44:39 -04:00
|
|
|
cross: ## build executable for macOS and Windows
|
2017-05-17 12:08:50 -04:00
|
|
|
./scripts/build/cross
|
2017-05-02 16:40:29 -04:00
|
|
|
|
2017-05-11 18:52:17 -04:00
|
|
|
.PHONY: dynbinary
|
2017-07-19 11:44:39 -04:00
|
|
|
dynbinary: ## build dynamically linked binary
|
2017-05-17 12:08:50 -04:00
|
|
|
./scripts/build/dynbinary
|
2017-05-11 18:52:17 -04:00
|
|
|
|
2017-05-15 17:00:35 -04:00
|
|
|
.PHONY: watch
|
2017-07-19 11:44:39 -04:00
|
|
|
watch: ## monitor file changes and run go test
|
2017-05-17 12:08:50 -04:00
|
|
|
./scripts/test/watch
|
2017-05-15 17:00:35 -04:00
|
|
|
|
2017-07-19 11:44:39 -04:00
|
|
|
vendor: vendor.conf ## check that vendor matches vendor.conf
|
2017-05-17 12:08:50 -04:00
|
|
|
vndr 2> /dev/null
|
|
|
|
scripts/validate/check-git-diff vendor
|
2017-05-09 15:37:22 -04:00
|
|
|
|
2017-05-10 21:24:32 -04:00
|
|
|
.PHONY: manpages
|
2017-07-19 11:44:39 -04:00
|
|
|
manpages: ## generate man pages from go source and markdown
|
2017-06-06 00:59:50 -04:00
|
|
|
scripts/docs/generate-man.sh
|
2017-05-10 21:24:32 -04:00
|
|
|
|
|
|
|
.PHONY: yamldocs
|
2017-07-19 11:44:39 -04:00
|
|
|
yamldocs: ## generate documentation YAML files consumed by docs repo
|
2017-05-10 21:24:32 -04:00
|
|
|
scripts/docs/generate-yaml.sh
|
|
|
|
|
2017-06-29 09:10:04 -04:00
|
|
|
.PHONY: shellcheck
|
2017-07-19 11:44:39 -04:00
|
|
|
shellcheck: ## run shellcheck validation
|
2017-06-29 09:10:04 -04:00
|
|
|
scripts/validate/shellcheck
|
|
|
|
|
2017-07-19 11:44:39 -04:00
|
|
|
.PHONY: help
|
|
|
|
help: ## print this help
|
|
|
|
@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {sub("\\\\n",sprintf("\n%22c"," "), $$2);printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST)
|
|
|
|
|
|
|
|
|
2017-05-09 15:37:22 -04:00
|
|
|
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
|
2017-05-17 12:08:50 -04:00
|
|
|
scripts/validate/check-git-diff cli/compose/schema/bindata.go
|