Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update README and add help target to make #363

Merged
merged 1 commit into from
Jul 22, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 18 additions & 19 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down