Update README and add help target to make

Signed-off-by: Jean-Pierre Huynh <jean-pierre.huynh@ounet.fr>
This commit is contained in:
Jean-Pierre Huynh 2017-07-19 16:44:39 +01:00
Родитель b75596e1e4
Коммит 649a5864f3
2 изменённых файлов: 24 добавлений и 19 удалений

Просмотреть файл

@ -3,62 +3,61 @@
#
all: binary
# remove build artifacts
.PHONY: clean
clean:
clean: ## remove build artifacts
rm -rf ./build/* cli/winresources/rsrc_* ./man/man[1-9] docs/yaml/gen
# run go test
# the "-tags daemon" part is temporary
.PHONY: test
test:
test: ## run go test
./scripts/test/unit $(shell go list ./... | grep -v '/vendor/')
.PHONY: test-coverage
test-coverage:
test-coverage: ## run test coverage
./scripts/test/unit-with-coverage $(shell go list ./... | grep -v '/vendor/')
.PHONY: lint
lint:
lint: ## run all the lint tools
gometalinter --config gometalinter.json ./...
.PHONY: binary
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:
cross: ## build executable for macOS and Windows
./scripts/build/cross
.PHONY: dynbinary
dynbinary:
dynbinary: ## build dynamically linked binary
./scripts/build/dynbinary
.PHONY: watch
watch:
watch: ## monitor file changes and run go test
./scripts/test/watch
# Check vendor matches vendor.conf
vendor: vendor.conf
vendor: vendor.conf ## check that vendor matches vendor.conf
vndr 2> /dev/null
scripts/validate/check-git-diff vendor
## generate man pages from go source and markdown
.PHONY: manpages
manpages:
manpages: ## generate man pages from go source and markdown
scripts/docs/generate-man.sh
## generate documentation YAML files consumed by docs repo
.PHONY: yamldocs
yamldocs:
yamldocs: ## generate documentation YAML files consumed by docs repo
scripts/docs/generate-yaml.sh
## Shellcheck validation
.PHONY: shellcheck
shellcheck:
shellcheck: ## run shellcheck validation
scripts/validate/shellcheck
.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)
cli/compose/schema/bindata.go: cli/compose/schema/data/*.json
go generate github.com/docker/cli/cli/compose/schema

Просмотреть файл

@ -29,6 +29,12 @@ Run all linting:
$ make -f docker.Makefile lint
```
List all the available targets:
```
$ make help
```
### In-container development environment
Start an interactive development environment: